From 8e663a1142ba4a6ebc13161cbd6fa5d754f70d7c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 12 Oct 2021 13:49:17 +0200 Subject: [PATCH] do not use ls, but globs in for loop --- lib/tests_coordination.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tests_coordination.sh b/lib/tests_coordination.sh index 9a0a806..1e81022 100644 --- a/lib/tests_coordination.sh +++ b/lib/tests_coordination.sh @@ -286,7 +286,7 @@ run_all_tests() { current_test_number=1 # The list of test contains for example "TEST_UPGRADE some_commit_id - for testfile in $(ls $TEST_CONTEXT/tests/*.json); + for testfile in "$TEST_CONTEXT"/tests/*.json; do TEST_LAUNCHER $testfile current_test_number=$((current_test_number+1)) @@ -384,7 +384,7 @@ SET_RESULT() { at_least_one_install_succeeded () { - for TEST in $(ls $TEST_CONTEXT/tests/*.json) + for TEST in "$TEST_CONTEXT"/tests/*.json do local test_id=$(basename $TEST | cut -d. -f1) jq -e '. | select(.test_type == "TEST_INSTALL")' $TEST >/dev/null \