aboutsummaryrefslogtreecommitdiff
path: root/show-expected-fail-tests.sh
diff options
context:
space:
mode:
authorAlex Chen <Cnly@users.noreply.github.com>2020-03-31 22:53:09 +0800
committerGitHub <noreply@github.com>2020-03-31 15:53:09 +0100
commit2c8950221ef47cf4298dbd1f6e94450e4c35a81e (patch)
tree4b168a0e665b1d82fcf1519c051421dd1af0d55c /show-expected-fail-tests.sh
parent8fbe9f40782bd56561c75ac74916900c11db3654 (diff)
Fix: show-expected-fail-tests.sh ignores # in whitelist and strips quotes in test names in output (#943)
Signed-off-by: Alex Chen <minecnly@gmail.com>
Diffstat (limited to 'show-expected-fail-tests.sh')
-rwxr-xr-xshow-expected-fail-tests.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/show-expected-fail-tests.sh b/show-expected-fail-tests.sh
index 9cd51b00..0a4c7be8 100755
--- a/show-expected-fail-tests.sh
+++ b/show-expected-fail-tests.sh
@@ -60,7 +60,7 @@ while read -r test_name; do
# Ignore empty lines
[ "${test_name}" = "" ] && continue
- grep "${test_name}" "${whitelist_file}" > /dev/null 2>&1
+ grep "^${test_name}" "${whitelist_file}" > /dev/null 2>&1
if [ "$?" != "0" ]; then
# Check if this test name is blacklisted
if printf '%s\n' "${blacklisted_tests[@]}" | grep -q -P "^${test_name}$"; then
@@ -80,8 +80,8 @@ done <<< "${passed_but_expected_fail}"
# TODO: Check that the same test doesn't appear twice in the whitelist|blacklist
# Trim test output strings
-tests_to_add=$(echo -e $tests_to_add | xargs)
-already_in_whitelist=$(echo -e $already_in_whitelist | xargs)
+tests_to_add=$(echo -e $tests_to_add | xargs -d '\n')
+already_in_whitelist=$(echo -e $already_in_whitelist | xargs -d '\n')
# Format output with markdown for buildkite annotation rendering purposes
if [ -n "${tests_to_add}" ] && [ -n "${already_in_whitelist}" ]; then