test: allow to skip matrix_run_one() if $TEST_MATCH_TESTCASE is set
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 16 Aug 2024 16:47:33 +0000 (01:47 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 10 Sep 2024 12:56:05 +0000 (14:56 +0200)
(cherry picked from commit 7908e1d459f5f2893d6aaf1d62009da7856f9410)

test/units/TEST-13-NSPAWN.nspawn.sh

index ee0fef8d061a51e7813e94187fd8a166358318e6..08992cf91ab5da934163b42e50d85701f27f4c50 100755 (executable)
@@ -943,6 +943,17 @@ matrix_run_one() {
     return 0
 }
 
+testcase_api_vfs() {
+    local api_vfs_writable
+
+    for api_vfs_writable in yes no network; do
+        matrix_run_one no  no  $api_vfs_writable
+        matrix_run_one yes no  $api_vfs_writable
+        matrix_run_one no  yes $api_vfs_writable
+        matrix_run_one yes yes $api_vfs_writable
+    done
+}
+
 testcase_check_os_release() {
     # https://github.com/systemd/systemd/issues/29185
     local base common_opts root
@@ -974,10 +985,3 @@ testcase_check_os_release() {
 }
 
 run_testcases
-
-for api_vfs_writable in yes no network; do
-    matrix_run_one no  no  $api_vfs_writable
-    matrix_run_one yes no  $api_vfs_writable
-    matrix_run_one no  yes $api_vfs_writable
-    matrix_run_one yes yes $api_vfs_writable
-done