Skip to content

eBPF-based security platform

testing: group coding checks

John Fastabend9e1de21c3392
diff --git a/testing/t0041-check-dco.sh b/testing/check/t0041-check-dco.sh
similarity index 99%
rename from testing/t0041-check-dco.sh
rename to testing/check/t0041-check-dco.sh
index f1dd3ef7..d70b1df9 100755
--- a/testing/t0041-check-dco.sh
+++ b/testing/check/t0041-check-dco.sh
@@ -6,7 +6,7 @@
# commit needs, the forms it rejects, the author the sign-off must come
# from and the merge commits it skips, on a throwaway repository.
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
command -v git >/dev/null 2>&1 || test_skip_all "git not installed"
S=$(cd .. && pwd)/.github/scripts/check-dco.sh
diff --git a/testing/t0042-check-spdx.sh b/testing/check/t0042-check-spdx.sh
similarity index 99%
rename from testing/t0042-check-spdx.sh
rename to testing/check/t0042-check-spdx.sh
index ce3a9aa3..370dab04 100755
--- a/testing/t0042-check-spdx.sh
+++ b/testing/check/t0042-check-spdx.sh
@@ -7,7 +7,7 @@
# BPF object compiles and a Beefile ships, the licences vendored C may
# carry, on a throwaway repository, and the tree itself.
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
command -v git >/dev/null 2>&1 || test_skip_all "git not installed"
ROOT=$(cd .. && pwd)
diff --git a/testing/t0043-check-style.sh b/testing/check/t0043-check-style.sh
similarity index 99%
rename from testing/t0043-check-style.sh
rename to testing/check/t0043-check-style.sh
index bf9950d7..56e73898 100644
--- a/testing/t0043-check-style.sh
+++ b/testing/check/t0043-check-style.sh
@@ -10,7 +10,7 @@
# string copies it refuses and the list of what stays enabled, on a
# throwaway repository.
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
command -v git >/dev/null 2>&1 || test_skip_all "git not installed"
command -v perl >/dev/null 2>&1 || test_skip_all "perl not installed"
diff --git a/testing/t0044-ci-commit-range.sh b/testing/check/t0044-ci-commit-range.sh
similarity index 98%
rename from testing/t0044-ci-commit-range.sh
rename to testing/check/t0044-ci-commit-range.sh
index a5aae485..5c179411 100644
--- a/testing/t0044-ci-commit-range.sh
+++ b/testing/check/t0044-ci-commit-range.sh
@@ -6,7 +6,7 @@
# pull request, a push and a force push hand to a checker, on a throwaway
# repository.
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
command -v git >/dev/null 2>&1 || test_skip_all "git not installed"
S=$(cd .. && pwd)/.github/scripts/ci-commit-range.sh
diff --git a/testing/run-tests.sh b/testing/run-tests.sh
index 2770e7d5..cda68e48 100755
--- a/testing/run-tests.sh
+++ b/testing/run-tests.sh
@@ -28,6 +28,19 @@ for t in t0[0-9][0-9][0-9]-*.sh; do
fi
done
+for t in check/t0[0-9][0-9][0-9]-*.sh; do
+ [ -e "$t" ] || continue
+ found=1
+ if sh "$t"; then
+ :
+ else
+ fail=$((fail + 1))
+ if [ -n "$SHIRUDO_TEST_SUITE_FAILURES_FILE" ]; then
+ printf '%s\n' "$t" >>"$SHIRUDO_TEST_SUITE_FAILURES_FILE" 2>/dev/null || :
+ fi
+ fi
+done
+
for t in signing/t0[0-9][0-9][0-9]-*.sh; do
[ -e "$t" ] || continue
found=1