@@ -31,13 +31,58 @@ if [[ -z "${MCPP_HOME:-}" ]]; then
3131fi
3232echo " MCPP_HOME: $MCPP_HOME "
3333
34+ # Platform detection: some tests are Linux-only (ELF patchelf, musl-static,
35+ # GCC-specific BMI layout, etc.)
36+ OS=" $( uname -s) "
37+ MACOS_SKIP=(
38+ # GCC-specific BMI assertions (gcm.cache/*.gcm)
39+ 03_multi_module.sh
40+ # Static library test checks ELF ar output format
41+ 07_static_library.sh
42+ # Shared library test hardcodes .so / ELF shared object
43+ 08_shared_library.sh
44+ # Path dependency checks .gcm BMI format (GCC-specific)
45+ 09_path_dependency.sh
46+ # Pack modes use patchelf (ELF-only)
47+ 30_pack_modes.sh
48+ # Toolchain management tests assume GCC availability
49+ 26_toolchain_management.sh
50+ 29_toolchain_partial_versions.sh
51+ # P1689 scanner test hardcodes GCC ddi format
52+ 20_p1689_scanner.sh
53+ # Ninja dyndep test hardcodes GCC module format
54+ 21_ninja_dyndep.sh
55+ # Doctor/cache/publish uses GCC fingerprint
56+ 22_doctor_cache_publish.sh
57+ # Self-contained home test assumes Linux sandbox layout
58+ 27_self_contained_home.sh
59+ # Multi-version mangling test uses GCC module format
60+ 33_multi_version_mangling.sh
61+ )
62+
63+ should_skip () {
64+ local name=" $1 "
65+ if [[ " $OS " == " Darwin" ]]; then
66+ for skip in " ${MACOS_SKIP[@]} " ; do
67+ [[ " $name " == " $skip " ]] && return 0
68+ done
69+ fi
70+ return 1
71+ }
72+
3473PASS=0
3574FAIL=0
75+ SKIP=0
3676FAILED_TESTS=()
3777
3878for test in " $HERE " /[0-9]* .sh; do
3979 name=" $( basename " $test " ) "
4080 echo
81+ if should_skip " $name " ; then
82+ echo " SKIP: $name (not applicable on $OS )"
83+ (( SKIP++ ))
84+ continue
85+ fi
4186 echo " === $name ==="
4287 if MCPP=" $MCPP " bash " $test " ; then
4388 echo " PASS: $name "
5196
5297echo
5398echo " ==============================================="
54- echo " E2E Summary: $PASS passed, $FAIL failed"
99+ echo " E2E Summary: $PASS passed, $FAIL failed, $SKIP skipped "
55100if [[ $FAIL -gt 0 ]]; then
56101 echo " Failed: ${FAILED_TESTS[@]} "
57102 exit 1
0 commit comments