Generalize runtest.sh test exclusion files
authorBruce Forstall <brucefo@microsoft.com>
Fri, 2 Mar 2018 02:10:55 +0000 (18:10 -0800)
committerBruce Forstall <brucefo@microsoft.com>
Fri, 2 Mar 2018 02:10:55 +0000 (18:10 -0800)
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

tests/runtest.sh
tests/testsFailing.arm64.txt [moved from tests/testsFailingOnArm64.txt with 100% similarity]
tests/testsUnsupported.arm.txt [moved from tests/testsUnsupportedOnARM32.txt with 100% similarity]

index 7e3fd98..64d12e7 100755 (executable)
@@ -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 {