@@ -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
7172ENABLE_EH=0
7273ENABLE_DEBUG_VERSION=0
7374ENABLE_GC_HEAP_VERIFY=0
75+ UNIT_FULL_TEST=0
7476# unit test case arrary
7577TEST_CASE_ARR=()
7678SGX_OPT=" "
@@ -93,7 +95,7 @@ REQUIREMENT_NAME=""
9395# Initialize an empty array for subrequirement IDs
9496SUBREQUIREMENT_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
9799do
98100 OPT_PARSED=" TRUE"
99101 case $opt in
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