Skip to content

Commit ca48a0f

Browse files
committed
Update test_wamr.sh to support full unit tests
Signed-off-by: zhenweijin <zhenwei.jin@intel.com>
1 parent 38ff8a7 commit ca48a0f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/wamr-test-suites/test_wamr.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function help()
4646
(e.g., ubsan, tsan, asan, posan)."
4747
echo "-A use the specified wamrc command instead of building it"
4848
echo "-N enable extended const expression feature"
49+
echo "-U enable full unit test (passes FULL_TEST=ON to cmake when -s unit is used)"
4950
echo "-r [requirement name] [N [N ...]] specify a requirement name followed by one or more"
5051
echo " subrequirement IDs, if no subrequirement is specificed,"
5152
echo " it will run all subrequirements. When this optin is used,"
@@ -71,6 +72,7 @@ ENABLE_XIP=0
7172
ENABLE_EH=0
7273
ENABLE_DEBUG_VERSION=0
7374
ENABLE_GC_HEAP_VERIFY=0
75+
UNIT_FULL_TEST=0
7476
#unit test case arrary
7577
TEST_CASE_ARR=()
7678
SGX_OPT=""
@@ -93,7 +95,7 @@ REQUIREMENT_NAME=""
9395
# Initialize an empty array for subrequirement IDs
9496
SUBREQUIREMENT_IDS=()
9597

96-
while getopts ":s:cabgvt:m:MCpSXexwWEPGQF:j:T:r:A:N" opt
98+
while getopts ":s:cabgvt:m:MCpSXexwWEPGQF:j:T:r:A:NU" opt
9799
do
98100
OPT_PARSED="TRUE"
99101
case $opt in
@@ -201,6 +203,10 @@ do
201203
echo "enable extended const expression feature"
202204
ENABLE_EXTENDED_CONST_EXPR=1
203205
;;
206+
U)
207+
echo "enable full unit test (FULL_TEST=ON)"
208+
UNIT_FULL_TEST=1
209+
;;
204210
P)
205211
PARALLELISM=1
206212
;;
@@ -336,7 +342,9 @@ function unit_test()
336342
echo "Build unit test"
337343
touch ${REPORT_DIR}/unit_test_report.txt
338344
cmake -S ${WORK_DIR}/../../unit -B unittest-build \
339-
-DCOLLECT_CODE_COVERAGE=${COLLECT_CODE_COVERAGE}
345+
-DCOLLECT_CODE_COVERAGE=${COLLECT_CODE_COVERAGE} \
346+
-DFULL_TEST=${UNIT_FULL_TEST} \
347+
-DWAMRC_COMPILER_DIR=${WAMR_DIR}/wamr-compiler/build
340348
cmake --build unittest-build
341349
ctest --test-dir unittest-build --output-on-failure | tee -a ${REPORT_DIR}/unit_test_report.txt
342350

0 commit comments

Comments
 (0)