From 7eeeab205d8066d3516b2bc552ff87a72eab824e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 10 Dec 2019 13:45:48 +0100 Subject: [PATCH] test: move TEST-30-ONCLOCKCHANGE setup to static files The two timezone files are now installed in the global setup. I am not too happy about this, but it still seems better than to create a completely separate image just for this. --- test/TEST-30-ONCLOCKCHANGE/test.sh | 25 +------------------ test/meson.build | 2 ++ test/test-functions | 1 + .../systemd-timedated.service.d/watchdog.conf | 2 ++ test/units/testsuite-30.service | 6 +++++ .../testsuite.sh => units/testsuite-30.sh} | 0 6 files changed, 12 insertions(+), 24 deletions(-) create mode 100644 test/testsuite-30.units/systemd-timedated.service.d/watchdog.conf create mode 100644 test/units/testsuite-30.service rename test/{TEST-30-ONCLOCKCHANGE/testsuite.sh => units/testsuite-30.sh} (100%) diff --git a/test/TEST-30-ONCLOCKCHANGE/test.sh b/test/TEST-30-ONCLOCKCHANGE/test.sh index 9e2c11238c..5b4133202f 100755 --- a/test/TEST-30-ONCLOCKCHANGE/test.sh +++ b/test/TEST-30-ONCLOCKCHANGE/test.sh @@ -12,32 +12,9 @@ test_setup() { LOG_LEVEL=5 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) - inst_any /usr/share/zoneinfo/Europe/Kiev - inst_any /usr/share/zoneinfo/Europe/Berlin - setup_basic_environment mask_supporting_services - - # extend the watchdog - mkdir -p $initdir/etc/systemd/system/systemd-timedated.service.d - cat >$initdir/etc/systemd/system/systemd-timedated.service.d/watchdog.conf <$initdir/etc/systemd/system/testsuite.service < $initdir/etc/environment > $initdir/etc/machine-id + # set the hostname echo systemd-testsuite > $initdir/etc/hostname # fstab diff --git a/test/testsuite-30.units/systemd-timedated.service.d/watchdog.conf b/test/testsuite-30.units/systemd-timedated.service.d/watchdog.conf new file mode 100644 index 0000000000..d5ed27cf6b --- /dev/null +++ b/test/testsuite-30.units/systemd-timedated.service.d/watchdog.conf @@ -0,0 +1,2 @@ +[Service] +WatchdogSec=10min diff --git a/test/units/testsuite-30.service b/test/units/testsuite-30.service new file mode 100644 index 0000000000..c3bb25853d --- /dev/null +++ b/test/units/testsuite-30.service @@ -0,0 +1,6 @@ +[Unit] +Description=TEST-30-ONCLOCKCHANGE + +[Service] +ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh +Type=oneshot diff --git a/test/TEST-30-ONCLOCKCHANGE/testsuite.sh b/test/units/testsuite-30.sh similarity index 100% rename from test/TEST-30-ONCLOCKCHANGE/testsuite.sh rename to test/units/testsuite-30.sh