From: Bruce Forstall Date: Fri, 2 Mar 2018 02:10:55 +0000 (-0800) Subject: Generalize runtest.sh test exclusion files X-Git-Tag: accepted/tizen/unified/20190422.045933~2791^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d4796fc072b3ec9c8a80765a9c4dab26fa30281;p=platform%2Fupstream%2Fcoreclr.git Generalize runtest.sh test exclusion files Allow leading '#' as a comment character for all testsUnsupported and testsFailing files. Generalize testsFailingOnArm64.txt to testsFailing.$ARCH.txt Generalize testsUnsupportedOnARM32.txt to testsUnsupported.$ARCH.txt --- diff --git a/tests/runtest.sh b/tests/runtest.sh index 7e3fd98..64d12e7 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -471,10 +471,17 @@ declare -a playlistTests function read_array { local theArray=() + if [ ! -f "$1" ]; then + return + fi + # bash in Mac OS X doesn't support 'readarray', so using alternate way instead. # readarray -t theArray < "$1" + # Any line that starts with '#' is ignored. while IFS='' read -r line || [ -n "$line" ]; do - theArray[${#theArray[@]}]=$line + if [[ $line != "#"* ]]; then + theArray[${#theArray[@]}]=$line + fi done < "$1" echo ${theArray[@]} } @@ -482,18 +489,13 @@ function read_array { function load_unsupported_tests { # Load the list of tests that are not supported on this platform. These tests are disabled (skipped) permanently. unsupportedTests=($(read_array "$(dirname "$0")/testsUnsupportedOutsideWindows.txt")) - if [ "$ARCH" == "arm" ]; then - unsupportedTests+=($(read_array "$(dirname "$0")/testsUnsupportedOnARM32.txt")) - fi + unsupportedTests+=($(read_array "$(dirname "$0")/testsUnsupported.$ARCH.txt")) } function load_failing_tests { # Load the list of tests that fail on this platform. These tests are disabled (skipped) temporarily, pending investigation. failingTests=($(read_array "$(dirname "$0")/testsFailingOutsideWindows.txt")) - - if [ "$ARCH" == "arm64" ]; then - failingTests+=($(read_array "$(dirname "$0")/testsFailingOnArm64.txt")) - fi + failingTests+=($(read_array "$(dirname "$0")/testsFailing.$ARCH.txt")) } function load_playlist_tests { diff --git a/tests/testsFailingOnArm64.txt b/tests/testsFailing.arm64.txt similarity index 100% rename from tests/testsFailingOnArm64.txt rename to tests/testsFailing.arm64.txt diff --git a/tests/testsUnsupportedOnARM32.txt b/tests/testsUnsupported.arm.txt similarity index 100% rename from tests/testsUnsupportedOnARM32.txt rename to tests/testsUnsupported.arm.txt