diff options
author | Sung-Jae Lee <sjlee@mail.com> | 2016-05-03 14:16:52 +0900 |
---|---|---|
committer | Sung-Jae Lee <sjlee@mail.com> | 2016-05-03 14:37:52 +0900 |
commit | 8c3f1869cd0063c6c5e88b56db6eef1e7da8e134 (patch) | |
tree | 6303e5b0d02381acc5385065324e6a14a77edc30 /tests/runtest.sh | |
parent | 84e2177f7844f7cf1ee2c7ae689396170d6a522a (diff) | |
download | coreclr-8c3f1869cd0063c6c5e88b56db6eef1e7da8e134.tar.gz coreclr-8c3f1869cd0063c6c5e88b56db6eef1e7da8e134.tar.bz2 coreclr-8c3f1869cd0063c6c5e88b56db6eef1e7da8e134.zip |
Fix 'runtest.sh' script
This change fixes a bug in the 'runtest.sh' that read test cases from
file given by '--testDirFile=<path>' option.
Remove LF characters while reading each line to make array properly.
Also changes similar codes in other place to same simple one.
Diffstat (limited to 'tests/runtest.sh')
-rwxr-xr-x | tests/runtest.sh | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/runtest.sh b/tests/runtest.sh index 7bbe6528e2..d6105c243a 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -429,25 +429,17 @@ declare -a playlistTests function load_unsupported_tests { # Load the list of tests that are not supported on this platform. These tests are disabled (skipped) permanently. - # 'readarray' is not used here, as it includes the trailing linefeed in lines placed in the array. - while IFS='' read -r line || [ -n "$line" ]; do - unsupportedTests[${#unsupportedTests[@]}]=$line - done <"$(dirname "$0")/testsUnsupportedOutsideWindows.txt" + readarray -t unsupportedTests <"$(dirname "$0")/testsUnsupportedOutsideWindows.txt" } function load_failing_tests { # Load the list of tests that fail on this platform. These tests are disabled (skipped) temporarily, pending investigation. - # 'readarray' is not used here, as it includes the trailing linefeed in lines placed in the array. - while IFS='' read -r line || [ -n "$line" ]; do - failingTests[${#failingTests[@]}]=$line - done <"$(dirname "$0")/testsFailingOutsideWindows.txt" + readarray -t failingTests <"$(dirname "$0")/testsFailingOutsideWindows.txt" } function load_playlist_tests { # Load the list of tests that are enabled as a part of this test playlist. - while IFS='' read -r line || [ -n "$line" ]; do - playlistTests[${#playlistTests[@]}]=$line - done <"${playlistFile}" + readarray -t playlistTests <"${playlistFile}" } function is_unsupported_test { @@ -647,7 +639,7 @@ function set_test_directories { exit_with_error "$errorSource" "Test directories file not found at $listFileName" fi - readarray testDirectories < "$listFileName" + readarray -t testDirectories < "$listFileName" } function run_tests_in_directory { |