diff --git a/.ci_scripts/native-build/add_nft_rules.sh b/.ci_scripts/native-build/add_nft_rules.sh index f3a8adf8e1b75cd7a4acbf5c52adc44acdbe01da..4c5e6170250b5261295f9f5cfa62f3ab0e6cbc1a 100755 --- a/.ci_scripts/native-build/add_nft_rules.sh +++ b/.ci_scripts/native-build/add_nft_rules.sh @@ -1,5 +1,8 @@ EXITCODE=0 +# Ensure globbing expands to an empty list if no matches are found +shopt -s nullglob + for nft_script in devices/*/firewall*.nft do # Try adding the ruleset diff --git a/.ci_scripts/native-build/run_cppcheck.sh b/.ci_scripts/native-build/run_cppcheck.sh index 256a579436040ae51eb08d96443731b642addab5..faaae370a70bd6372dadc4f03524aaee322bcd37 100755 --- a/.ci_scripts/native-build/run_cppcheck.sh +++ b/.ci_scripts/native-build/run_cppcheck.sh @@ -2,7 +2,7 @@ EXITCODE=0 PARSERS_DIR="src/parsers" # Pattern matching on all source files -for file in $(find "$GITHUB_WORKSPACE"/include "$GITHUB_WORKSPACE"/src "$GITHUB_WORKSPACE"/devices "$GITHUB_WORKSPACE"/test "$PARSERS_DIR"/include "$PARSERS_DIR"/src "$PARSERS_DIR"/test -name *.h -o -name *.c) +for file in $(find include src devices test "$PARSERS_DIR"/include "$PARSERS_DIR"/src "$PARSERS_DIR"/test -name *.h -o -name *.c) do if [[ "$file" != *"/hashmap.c" ]] then diff --git a/.ci_scripts/native-build/run_tests.sh b/.ci_scripts/native-build/run_tests.sh index 9eab0f2f1af69aefb8261a3fc04b3d18d2b4c187..2a48feed03f2930efe76be3c85c77cc6ee813a24 100755 --- a/.ci_scripts/native-build/run_tests.sh +++ b/.ci_scripts/native-build/run_tests.sh @@ -2,8 +2,11 @@ EXITCODE=0 PARSERS_DIR="src/parsers" VALGRIND_SUPP=".ci_scripts/native-build/valgrind.supp" +# Ensure globbing expands to an empty list if no matches are found +shopt -s nullglob + PREFIX="" -for file in "$GITHUB_WORKSPACE"/bin/test/* "$PARSERS_DIR"/bin/test/* +for file in bin/test/* "$PARSERS_DIR"/bin/test/* do if [[ "$file" == *"rule_utils-test" ]] then diff --git a/.ci_scripts/native-build/translate_profiles.sh b/.ci_scripts/native-build/translate_profiles.sh index 53721a446e86fbb3bec5534b6a72e807de1b60b1..8d99217d49901cceeedb7483037d76f37e41d45d 100755 --- a/.ci_scripts/native-build/translate_profiles.sh +++ b/.ci_scripts/native-build/translate_profiles.sh @@ -1,6 +1,9 @@ # NFQueue start index NFQ_ID_START=0 +# Ensure globbing expands to an empty list if no matches are found +shopt -s nullglob + for DEVICE in devices/* do if [ -d $DEVICE ]