From 9710829e781d66136dff83fd85c4987db0c23bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Thu, 25 May 2023 12:32:53 -0700 Subject: [PATCH] ci: Gracefully handle test names with spaces inside MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry pick of pieces of f909f8bf110d ("ci: temporarily disable test_btf_dump_case") from vmtest to handle spaces in test names properly. Signed-off-by: Daniel Müller --- ci/vmtest/run_selftests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/vmtest/run_selftests.sh b/ci/vmtest/run_selftests.sh index 1dcde76..f7222c0 100755 --- a/ci/vmtest/run_selftests.sh +++ b/ci/vmtest/run_selftests.sh @@ -13,7 +13,7 @@ read_lists() { if [[ -s "$path" ]]; then cat "$path" fi; - done) | cut -d'#' -f1 | tr -s ' \t\n' ',' + done) | cut -d'#' -f1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | tr -s '\n' ',' } test_progs() { @@ -22,7 +22,7 @@ test_progs() { # "&& true" does not change the return code (it is not executed # if the Python script fails), but it prevents exiting on a # failure due to the "set -e". - ./test_progs ${DENYLIST:+-d$DENYLIST} ${ALLOWLIST:+-a$ALLOWLIST} && true + ./test_progs ${DENYLIST:+-d"$DENYLIST"} ${ALLOWLIST:+-a"$ALLOWLIST"} && true echo "test_progs:$?" >> "${STATUS_FILE}" foldable end test_progs fi @@ -30,7 +30,7 @@ test_progs() { test_progs_no_alu32() { foldable start test_progs-no_alu32 "Testing test_progs-no_alu32" - ./test_progs-no_alu32 ${DENYLIST:+-d$DENYLIST} ${ALLOWLIST:+-a$ALLOWLIST} && true + ./test_progs-no_alu32 ${DENYLIST:+-d"$DENYLIST"} ${ALLOWLIST:+-a"$ALLOWLIST"} && true echo "test_progs-no_alu32:$?" >> "${STATUS_FILE}" foldable end test_progs-no_alu32 }