VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/tstIEMAImplData.sh@ 94409

最後變更 在這個檔案從94409是 94409,由 vboxsync 提交於 3 年 前

tstIEMAImpl: Split the data out and put it in separate files to avoid turning it into a compiler memory usage test. bugref:9898

  • 屬性 svn:eol-style 設為 LF
  • 屬性 svn:executable 設為 *
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 1.5 KB
 
1#!/usr/bin/env kmk_ash
2
3#
4# Copyright (C) 2022 Oracle Corporation
5#
6# This file is part of VirtualBox Open Source Edition (OSE), as
7# available from http://www.alldomusa.eu.org. This file is free software;
8# you can redistribute it and/or modify it under the terms of the GNU
9# General Public License (GPL) as published by the Free Software
10# Foundation, in version 2 as it comes in the "COPYING" file of the
11# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
12# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
13#
14
15# Get parameters.
16 CP="$1"
17 MV="$2"
18 SED="$3"
19 OUTDIR="$4"
20 SRCDIR="$5"
21 FILE="$6"
22
23# Globals.
24set -e
25LC_ALL=C
26export LC_ALL
27SRCFILE="${SRCDIR}/tstIEMAImplData${FILE}.cpp"
28OUTFILE="${OUTDIR}/tstIEMAImplData${FILE}.cpp"
29
30# Copy the file and deal with empty file.
31if test -f "${SRCFILE}"; then
32 "${CP}" -f -- "${SRCFILE}" "${OUTFILE}.tmp"
33else
34 > "${OUTFILE}.tmp"
35fi
36if ! test -s "${OUTFILE}.tmp"; then
37 echo '#include "tstIEMAImpl.h"' >> "${OUTFILE}.tmp"
38fi
39echo '' >> "${OUTFILE}.tmp"
40
41# Stub empty test arrays.
42"${SED}" -n \
43 -e 's/TSTIEM_DECLARE_TEST_ARRAY[(]'"${FILE}"', *\([^,]*\), *\([^ ][^ ]*\) *[)];/\1\n\2/p' \
44 "${SRCDIR}/tstIEMAImpl.h" \
45| \
46while IFS= read -r a_Type && IFS= read -r a_Instr;
47do
48 if "${SED}" -n -e "/ const g_cTests_${a_Instr} /q1" "${OUTFILE}.tmp"; then
49 echo "TSTIEM_DEFINE_EMPTY_TEST_ARRAY(${a_Type}, ${a_Instr});" >> "${OUTFILE}.tmp"
50 fi
51done
52
53# Put the file in place.
54"${MV}" -f -- "${OUTFILE}.tmp" "${OUTFILE}"
55
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette