diff --git a/.ci_scripts/native-build/add_nft_rules.sh b/.ci_scripts/native-build/add_nft_rules.sh index 498850ce9d7e1e1f626ad5d1c399a112218f7ee6..8a89bd6bae554e9b4f4bafa38fe7f20a4ec46001 100755 --- a/.ci_scripts/native-build/add_nft_rules.sh +++ b/.ci_scripts/native-build/add_nft_rules.sh @@ -1,19 +1,16 @@ +# CONSTANTS EXITCODE=0 -for nft_script in $GITHUB_WORKSPACE/test/device/firewall.nft -do - # Flush the ruleset before next device - sudo nft flush ruleset - # Try adding the ruleset - sudo nft -f "$nft_script" - # If the exit code is not 0, set EXITCODE to 1 - if [[ $? -ne 0 ]] - then - EXITCODE=1 - fi -done +# Flush the ruleset before next device +sudo nft flush ruleset +# Try adding the ruleset +sudo nft -f test/device/firewall.nft +# If the exit code is not 0, set EXITCODE to 1 +if [[ $? -ne 0 ]] +then + EXITCODE=1 +fi -# Cleanup: Flush the ruleset sudo nft flush ruleset -exit $EXITCODE +exit $EXITCODE \ No newline at end of file diff --git a/.ci_scripts/native-build/run_cppcheck.sh b/.ci_scripts/native-build/run_cppcheck.sh index 4cfd7075a7cec5d207c85e0d24df77a54be03832..077ad8cf005fce920aca29108c8c9d1dba310aea 100755 --- a/.ci_scripts/native-build/run_cppcheck.sh +++ b/.ci_scripts/native-build/run_cppcheck.sh @@ -1,8 +1,8 @@ EXITCODE=0 -PARSERS_DIR="$GITHUB_WORKSPACE/src/parsers" +PARSERS_DIR="src/parsers" # Pattern matching on all source files -for file in $(find "$GITHUB_WORKSPACE"/include "$GITHUB_WORKSPACE"/src "$GITHUB_WORKSPACE"/test "$PARSERS_DIR"/include "$PARSERS_DIR"/src "$PARSERS_DIR"/test -name *.h -o -name *.c) +for file in $(find include src 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_exec.sh b/.ci_scripts/native-build/run_exec.sh index 0a93f4fbb6388917fdb308e55bd0d9455a44285b..cb4ae7d05293db5c6dc0ab2cd4607b5a5d92869d 100755 --- a/.ci_scripts/native-build/run_exec.sh +++ b/.ci_scripts/native-build/run_exec.sh @@ -2,7 +2,7 @@ # Constants TIMEOUT=5 # seconds -BIN_DIR="$GITHUB_WORKSPACE/bin" +BIN_DIR="bin" # Ensure globbing expands to an empty list if no matches are found shopt -s nullglob diff --git a/.ci_scripts/native-build/run_tests.sh b/.ci_scripts/native-build/run_tests.sh index e911e16892d3b50bf2536c4edf9f2c1a50b90ef4..fd95ee13d4893fa6af90acb17a9609fbdfd8127f 100755 --- a/.ci_scripts/native-build/run_tests.sh +++ b/.ci_scripts/native-build/run_tests.sh @@ -1,9 +1,9 @@ EXITCODE=0 -PARSERS_DIR="$GITHUB_WORKSPACE/src/parsers" -VALGRIND_SUPP="$GITHUB_WORKSPACE/.ci_scripts/native-build/valgrind.supp" +PARSERS_DIR="src/parsers" +VALGRIND_SUPP=".ci_scripts/native-build/valgrind.supp" 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/src/parsers b/src/parsers index 0ef0b310bc56c35c8ca4134956326190d9b73a51..f57c3b1dcb246d667cf473a7907407e38e22f13c 160000 --- a/src/parsers +++ b/src/parsers @@ -1 +1 @@ -Subproject commit 0ef0b310bc56c35c8ca4134956326190d9b73a51 +Subproject commit f57c3b1dcb246d667cf473a7907407e38e22f13c