Skip to content

eBPF-based security platform

testing: group image tests

John Fastabendc30bca9a623c
diff --git a/testing/t0045-config-image.sh b/testing/image/t0045-config-image.sh
similarity index 99%
rename from testing/t0045-config-image.sh
rename to testing/image/t0045-config-image.sh
index 011d3cfb..01fa4077 100755
--- a/testing/t0045-config-image.sh
+++ b/testing/image/t0045-config-image.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026 Authors of shirudo
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
H=${SHIRUDO_IMAGE_TEST_HELPER:-./helper/test-config-image}
diff --git a/testing/t0047-image-config.sh b/testing/image/t0047-image-config.sh
similarity index 99%
rename from testing/t0047-image-config.sh
rename to testing/image/t0047-image-config.sh
index c358ef08..62c4a8c5 100755
--- a/testing/t0047-image-config.sh
+++ b/testing/image/t0047-image-config.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026 Authors of shirudo
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
H=${SHIRUDO_TEST_IMAGE_CONFIG_HELPER:-./helper/test-image-config}
diff --git a/testing/t0050-image-keys.sh b/testing/image/t0050-image-keys.sh
similarity index 99%
rename from testing/t0050-image-keys.sh
rename to testing/image/t0050-image-keys.sh
index 8913c94e..5ed24df2 100755
--- a/testing/t0050-image-keys.sh
+++ b/testing/image/t0050-image-keys.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026 Authors of shirudo
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
H=${SHIRUDO_TEST_IMAGE_KEYS_HELPER:-$(pwd)/helper/test-image-keys}
SHB=../tools/shirudo-build/shirudo-build
diff --git a/testing/t0051-image-cli.sh b/testing/image/t0051-image-cli.sh
similarity index 99%
rename from testing/t0051-image-cli.sh
rename to testing/image/t0051-image-cli.sh
index 051386df..30a04b8e 100755
--- a/testing/t0051-image-cli.sh
+++ b/testing/image/t0051-image-cli.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026 Authors of shirudo
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
H=${SHIRUDO_TEST_IMAGE_CLI_HELPER:-./helper/test-image-cli}
diff --git a/testing/t0052-image-cleanup.sh b/testing/image/t0052-image-cleanup.sh
similarity index 96%
rename from testing/t0052-image-cleanup.sh
rename to testing/image/t0052-image-cleanup.sh
index ed04a13d..38e59df7 100755
--- a/testing/t0052-image-cleanup.sh
+++ b/testing/image/t0052-image-cleanup.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026 Authors of shirudo
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
H=${SHIRUDO_TEST_IMAGE_CLEANUP_HELPER:-./helper/test-image-cleanup}
diff --git a/testing/t0054-image-bootstrap.sh b/testing/image/t0054-image-bootstrap.sh
similarity index 99%
rename from testing/t0054-image-bootstrap.sh
rename to testing/image/t0054-image-bootstrap.sh
index f0d40191..a83d516c 100755
--- a/testing/t0054-image-bootstrap.sh
+++ b/testing/image/t0054-image-bootstrap.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026 Authors of shirudo
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
H=${SHIRUDO_TEST_IMAGE_CONFIG_HELPER:-./helper/test-image-config}
diff --git a/testing/run-tests.sh b/testing/run-tests.sh
index cda68e48..1e870e1e 100755
--- a/testing/run-tests.sh
+++ b/testing/run-tests.sh
@@ -41,6 +41,19 @@ for t in check/t0[0-9][0-9][0-9]-*.sh; do
fi
done
+for t in image/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