Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions tests/wamr-test-suites/test_wamr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function help()
(e.g., ubsan, tsan, asan, posan)."
echo "-A use the specified wamrc command instead of building it"
echo "-N enable extended const expression feature"
echo "-U enable full unit test (passes FULL_TEST=ON to cmake when -s unit is used)"
echo "-r [requirement name] [N [N ...]] specify a requirement name followed by one or more"
echo " subrequirement IDs, if no subrequirement is specificed,"
echo " it will run all subrequirements. When this optin is used,"
Expand All @@ -71,6 +72,7 @@ ENABLE_XIP=0
ENABLE_EH=0
ENABLE_DEBUG_VERSION=0
ENABLE_GC_HEAP_VERIFY=0
UNIT_FULL_TEST=0
#unit test case arrary
TEST_CASE_ARR=()
SGX_OPT=""
Expand All @@ -93,7 +95,7 @@ REQUIREMENT_NAME=""
# Initialize an empty array for subrequirement IDs
SUBREQUIREMENT_IDS=()

while getopts ":s:cabgvt:m:MCpSXexwWEPGQF:j:T:r:A:N" opt
while getopts ":s:cabgvt:m:MCpSXexwWEPGQF:j:T:r:A:NU" opt
do
OPT_PARSED="TRUE"
case $opt in
Expand Down Expand Up @@ -201,6 +203,10 @@ do
echo "enable extended const expression feature"
ENABLE_EXTENDED_CONST_EXPR=1
;;
U)
echo "enable full unit test (FULL_TEST=ON)"
UNIT_FULL_TEST=1
;;
P)
PARALLELISM=1
;;
Expand Down Expand Up @@ -336,7 +342,9 @@ function unit_test()
echo "Build unit test"
touch ${REPORT_DIR}/unit_test_report.txt
cmake -S ${WORK_DIR}/../../unit -B unittest-build \
-DCOLLECT_CODE_COVERAGE=${COLLECT_CODE_COVERAGE}
-DCOLLECT_CODE_COVERAGE=${COLLECT_CODE_COVERAGE} \
-DFULL_TEST=${UNIT_FULL_TEST} \
-DWAMRC_COMPILER_DIR=${WAMR_DIR}/wamr-compiler/build
cmake --build unittest-build
ctest --test-dir unittest-build --output-on-failure | tee -a ${REPORT_DIR}/unit_test_report.txt

Expand Down
Loading