From 0c93a0044fd9e95a357dcc6086d100f1f7beef07 Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Thu, 25 Sep 2025 18:33:30 +0200 Subject: [PATCH] Don't run Unix-only test on Msys Detect Msys and use the existing X flag in testcases.txt to exclude the forktest. * mps/tool/testrun.sh (EXCLUDE_OS): New variable. --- mps/tool/testrun.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/mps/tool/testrun.sh b/mps/tool/testrun.sh index d74bbfd4526..02d2e6593df 100755 --- a/mps/tool/testrun.sh +++ b/mps/tool/testrun.sh @@ -33,6 +33,12 @@ case $(uname -m) in *) EXCLUDE_ARCH= ;; esac +# OS exclusions. +case $(uname -o) in + Msys) EXCLUDE_OS=X ;; + *) EXCLUDE_OS=W ;; +esac + # Parse command-line arguments. while [ $# -gt 0 ]; do case $1 in @@ -40,19 +46,20 @@ while [ $# -gt 0 ]; do TEST_SUITE=$2 # Test-suite exclusions. case $TEST_SUITE in - testrun) EXCLUDE_SUITE=LNW ;; - testci) EXCLUDE_SUITE=BNW ;; - testall) EXCLUDE_SUITE=NW ;; - testansi) EXCLUDE_SUITE=LNTW ;; - testpollnone) EXCLUDE_SUITE=LNPTW ;; + testrun) EXCLUDE_SUITE=LN ;; + testci) EXCLUDE_SUITE=BN ;; + testall) EXCLUDE_SUITE=N ;; + testansi) EXCLUDE_SUITE=LNT ;; + testpollnone) EXCLUDE_SUITE=LNPT ;; *) echo "Test suite $TEST_SUITE not recognized." exit 1 ;; esac echo "Test suite: $TEST_SUITE" TEST_CASE_DB=$(dirname -- "$0")/testcases.txt + EXCLUDE_FLAGS=${EXCLUDE_ARCH}${EXCLUDE_OS}${EXCLUDE_SUITE} TEST_CASES=$(<"$TEST_CASE_DB" grep -e '^[a-z]' | - grep -v -e "=[${EXCLUDE_ARCH}${EXCLUDE_SUITE}]" | + grep -v -e "=[${EXCLUDE_FLAGS}]" | cut -d' ' -f1) shift 2 ;;