From 9309a23b9513f9e36a4e7c7c7d917444ee2d97bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 22 Sep 2020 18:26:28 +0200 Subject: [PATCH] test: switch TEST-02-CRYPTSETUP and TEST-24-UNITTESTS When tests are executed serially (the default), it seems better to launch the fairly generic test that runs the unittests early in the sequence. Right now the tests are ordered based on when they were written, but this doesn't make much sense. --- test/{TEST-02-CRYPTSETUP => TEST-02-UNITTESTS}/Makefile | 0 .../deny-list-ubuntu-ci-ppc64el | 0 test/{TEST-24-UNIT-TESTS => TEST-02-UNITTESTS}/test.sh | 2 +- test/{TEST-24-UNIT-TESTS => TEST-24-CRYPTSETUP}/Makefile | 0 test/{TEST-02-CRYPTSETUP => TEST-24-CRYPTSETUP}/test.sh | 2 +- test/units/testsuite-02.service | 5 ++--- test/units/{testsuite-24.sh => testsuite-02.sh} | 0 test/units/testsuite-24.service | 5 +++-- 8 files changed, 7 insertions(+), 7 deletions(-) rename test/{TEST-02-CRYPTSETUP => TEST-02-UNITTESTS}/Makefile (100%) rename test/{TEST-24-UNIT-TESTS => TEST-02-UNITTESTS}/deny-list-ubuntu-ci-ppc64el (100%) rename test/{TEST-24-UNIT-TESTS => TEST-02-UNITTESTS}/test.sh (98%) rename test/{TEST-24-UNIT-TESTS => TEST-24-CRYPTSETUP}/Makefile (100%) rename test/{TEST-02-CRYPTSETUP => TEST-24-CRYPTSETUP}/test.sh (99%) rename test/units/{testsuite-24.sh => testsuite-02.sh} (100%) diff --git a/test/TEST-02-CRYPTSETUP/Makefile b/test/TEST-02-UNITTESTS/Makefile similarity index 100% rename from test/TEST-02-CRYPTSETUP/Makefile rename to test/TEST-02-UNITTESTS/Makefile diff --git a/test/TEST-24-UNIT-TESTS/deny-list-ubuntu-ci-ppc64el b/test/TEST-02-UNITTESTS/deny-list-ubuntu-ci-ppc64el similarity index 100% rename from test/TEST-24-UNIT-TESTS/deny-list-ubuntu-ci-ppc64el rename to test/TEST-02-UNITTESTS/deny-list-ubuntu-ci-ppc64el diff --git a/test/TEST-24-UNIT-TESTS/test.sh b/test/TEST-02-UNITTESTS/test.sh similarity index 98% rename from test/TEST-24-UNIT-TESTS/test.sh rename to test/TEST-02-UNITTESTS/test.sh index e5553b0fb5..6143d3352b 100755 --- a/test/TEST-24-UNIT-TESTS/test.sh +++ b/test/TEST-02-UNITTESTS/test.sh @@ -60,4 +60,4 @@ check_result_qemu() { return $_ret } -do_test "$@" 24 +do_test "$@" 02 diff --git a/test/TEST-24-UNIT-TESTS/Makefile b/test/TEST-24-CRYPTSETUP/Makefile similarity index 100% rename from test/TEST-24-UNIT-TESTS/Makefile rename to test/TEST-24-CRYPTSETUP/Makefile diff --git a/test/TEST-02-CRYPTSETUP/test.sh b/test/TEST-24-CRYPTSETUP/test.sh similarity index 99% rename from test/TEST-02-CRYPTSETUP/test.sh rename to test/TEST-24-CRYPTSETUP/test.sh index ef1811122e..2a6ad310ed 100755 --- a/test/TEST-02-CRYPTSETUP/test.sh +++ b/test/TEST-24-CRYPTSETUP/test.sh @@ -76,4 +76,4 @@ test_setup_cleanup() { cleanup_initdir } -do_test "$@" 02 +do_test "$@" 24 diff --git a/test/units/testsuite-02.service b/test/units/testsuite-02.service index 13e7ec3639..075e979d29 100644 --- a/test/units/testsuite-02.service +++ b/test/units/testsuite-02.service @@ -1,8 +1,7 @@ [Unit] -Description=TEST-02-CRYPTSETUP -After=multi-user.target +Description=TEST-02-UNITTESTS [Service] ExecStartPre=rm -f /failed /testok -ExecStart=sh -x -e -c 'mountpoint /var; systemctl --state=failed --no-legend --no-pager >/failed; echo OK >/testok' +ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh Type=oneshot diff --git a/test/units/testsuite-24.sh b/test/units/testsuite-02.sh similarity index 100% rename from test/units/testsuite-24.sh rename to test/units/testsuite-02.sh diff --git a/test/units/testsuite-24.service b/test/units/testsuite-24.service index 43d4816d48..e66f61388f 100644 --- a/test/units/testsuite-24.service +++ b/test/units/testsuite-24.service @@ -1,7 +1,8 @@ [Unit] -Description=TEST-24-UNIT-TESTS +Description=TEST-24-CRYPTSETUP +After=multi-user.target [Service] ExecStartPre=rm -f /failed /testok -ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh +ExecStart=sh -x -e -c 'mountpoint /var; systemctl --state=failed --no-legend --no-pager >/failed; echo OK >/testok' Type=oneshot