Skip to content

Commit 4ab0d49

Browse files
committed
clean up incompatible running mode checks in test script and ci
1 parent 933f812 commit 4ab0d49

File tree

2 files changed

+40
-68
lines changed

2 files changed

+40
-68
lines changed

.github/workflows/compilation_on_android_ubuntu.yml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -618,49 +618,6 @@ jobs:
618618
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
619619
running_mode: aot
620620
test_option: $WAMR_COMPILER_TEST_OPTIONS
621-
exclude:
622-
# incompatible modes and features
623-
# classic-interp doesn't support simd
624-
- running_mode: "classic-interp"
625-
test_option: $SIMD_TEST_OPTIONS
626-
# llvm jit doesn't support multi module
627-
- running_mode: "jit"
628-
test_option: $MULTI_MODULES_TEST_OPTIONS
629-
# fast-jit doesn't support multi module, simd
630-
- running_mode: "fast-jit"
631-
test_option: $MULTI_MODULES_TEST_OPTIONS
632-
- running_mode: "fast-jit"
633-
test_option: $SIMD_TEST_OPTIONS
634-
# multi-tier-jit doesn't support multi module, simd
635-
- running_mode: "multi-tier-jit"
636-
test_option: $MULTI_MODULES_TEST_OPTIONS
637-
- running_mode: "multi-tier-jit"
638-
test_option: $SIMD_TEST_OPTIONS
639-
# fast-jit and multi-tier-jit don't support GC
640-
- running_mode: "fast-jit"
641-
test_option: $GC_TEST_OPTIONS
642-
- running_mode: "multi-tier-jit"
643-
test_option: $GC_TEST_OPTIONS
644-
# fast-interp, fast-jit, llvm-jit, multi-tier-jit don't support Memory64
645-
- running_mode: "fast-interp"
646-
test_option: $MEMORY64_TEST_OPTIONS
647-
- running_mode: "fast-jit"
648-
test_option: $MEMORY64_TEST_OPTIONS
649-
- running_mode: "jit"
650-
test_option: $MEMORY64_TEST_OPTIONS
651-
- running_mode: "multi-tier-jit"
652-
test_option: $MEMORY64_TEST_OPTIONS
653-
# aot, fast-interp, fast-jit, llvm-jit, multi-tier-jit don't support Multi Memory
654-
- running_mode: "aot"
655-
test_option: $MULTI_MEMORY_TEST_OPTIONS
656-
- running_mode: "fast-interp"
657-
test_option: $MULTI_MEMORY_TEST_OPTIONS
658-
- running_mode: "fast-jit"
659-
test_option: $MULTI_MEMORY_TEST_OPTIONS
660-
- running_mode: "jit"
661-
test_option: $MULTI_MEMORY_TEST_OPTIONS
662-
- running_mode: "multi-tier-jit"
663-
test_option: $MULTI_MEMORY_TEST_OPTIONS
664621

665622
steps:
666623
- name: checkout

tests/wamr-test-suites/test_wamr.sh

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,9 @@ function spec_test()
478478
fi
479479

480480
# As of version 1.0.36, wabt is still unable to correctly handle the GC proposal.
481-
#
481+
#
482482
# $ $ /opt/wabt-1.0.36/bin/wast2json --enable-all ../spec/test/core/br_if.wast
483-
#
483+
#
484484
# ../spec/test/core/br_if.wast:670:26: error: unexpected token "null", expected a numeric index or a name (e.g. 12 or $foo).
485485
# (func $f (param (ref null $t)) (result funcref) (local.get 0))
486486
#
@@ -877,11 +877,23 @@ function do_execute_in_running_mode()
877877
{
878878
local RUNNING_MODE="$1"
879879

880-
if [[ ${ENABLE_MULTI_MEMORY} -eq 1 ]]; then
880+
# filter out uncompatible running mode based on targeting proposal features
881+
# keep alpha order
882+
883+
if [[ ${ENABLE_EH} -eq 1 ]]; then
884+
if [[ "${RUNNING_MODE}" != "classic-interp" ]]; then
885+
echo "support exception handling in classic-interp"
886+
return 0;
887+
fi
888+
fi
889+
890+
if [[ ${ENABLE_GC} -eq 1 ]]; then
881891
if [[ "${RUNNING_MODE}" != "classic-interp" \
892+
&& "${RUNNING_MODE}" != "fast-interp" \
893+
&& "${RUNNING_MODE}" != "jit" \
882894
&& "${RUNNING_MODE}" != "aot" ]]; then
883-
echo "support multi-memory in classic-interp mode and aot mode"
884-
return 0
895+
echo "support gc in both interp modes, llvm-jit mode and aot mode"
896+
return 0;
885897
fi
886898
fi
887899

@@ -893,21 +905,19 @@ function do_execute_in_running_mode()
893905
fi
894906
fi
895907

896-
if [[ ${ENABLE_MULTI_MODULE} -eq 1 ]]; then
908+
if [[ ${ENABLE_MULTI_MEMORY} -eq 1 ]]; then
897909
if [[ "${RUNNING_MODE}" != "classic-interp" \
898-
&& "${RUNNING_MODE}" != "fast-interp" \
899910
&& "${RUNNING_MODE}" != "aot" ]]; then
900-
echo "support multi-module in both interp modes"
911+
echo "support multi-memory in classic-interp mode and aot mode"
901912
return 0
902913
fi
903914
fi
904915

905-
if [[ ${SGX_OPT} == "--sgx" ]]; then
916+
if [[ ${ENABLE_MULTI_MODULE} -eq 1 ]]; then
906917
if [[ "${RUNNING_MODE}" != "classic-interp" \
907918
&& "${RUNNING_MODE}" != "fast-interp" \
908-
&& "${RUNNING_MODE}" != "aot" \
909-
&& "${RUNNING_MODE}" != "fast-jit" ]]; then
910-
echo "support sgx in both interp modes, fast-jit mode and aot mode"
919+
&& "${RUNNING_MODE}" != "aot" ]]; then
920+
echo "support multi-module in both interp modes"
911921
return 0
912922
fi
913923
fi
@@ -919,26 +929,31 @@ function do_execute_in_running_mode()
919929
fi
920930
fi
921931

932+
# filter out uncompatible running mode based on SGX support
933+
if [[ ${SGX_OPT} == "--sgx" ]]; then
934+
if [[ "${RUNNING_MODE}" != "classic-interp" \
935+
&& "${RUNNING_MODE}" != "fast-interp" \
936+
&& "${RUNNING_MODE}" != "aot" \
937+
&& "${RUNNING_MODE}" != "fast-jit" ]]; then
938+
echo "support sgx in both interp modes, fast-jit mode and aot mode"
939+
return 0
940+
fi
941+
fi
942+
943+
# filter out uncompatible running mode based on architecture
922944
if [[ ${TARGET} == "X86_32" ]]; then
923-
if [[ "${RUNNING_MODE}" == "jit" || "${RUNNING_MODE}" == "fast-jit" ]]; then
924-
echo "both llvm-jit mode and fast-jit mode do not support X86_32 target"
945+
if [[ "${RUNNING_MODE}" == "jit" || "${RUNNING_MODE}" == "fast-jit" || "${RUNNING_MODE}" == "multi-tier-jit" ]]; then
946+
echo "both llvm-jit, fast-jit and multi-tier-jit mode do not support X86_32 target"
925947
return 0;
926948
fi
927-
fi
928949

929-
if [[ ${ENABLE_GC} -eq 1 ]]; then
930-
if [[ "${RUNNING_MODE}" != "classic-interp" \
931-
&& "${RUNNING_MODE}" != "fast-interp" \
932-
&& "${RUNNING_MODE}" != "jit" \
933-
&& "${RUNNING_MODE}" != "aot" ]]; then
934-
echo "support gc in both interp modes, llvm-jit mode and aot mode"
950+
if [[ ${ENABLE_MULTI_MEMORY} -eq 1 ]]; then
951+
echo "multi-memory does not support X86_32 target"
935952
return 0;
936953
fi
937-
fi
938954

939-
if [[ ${ENABLE_EH} -eq 1 ]]; then
940-
if [[ "${RUNNING_MODE}" != "classic-interp" ]]; then
941-
echo "support exception handling in classic-interp"
955+
if [[ ${ENABLE_SIMD} -eq 1 ]]; then
956+
echo "simd does not support X86_32 target"
942957
return 0;
943958
fi
944959
fi

0 commit comments

Comments
 (0)