]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: move TEST-30-ONCLOCKCHANGE setup to static files
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 10 Dec 2019 12:45:48 +0000 (13:45 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 28 Mar 2020 10:46:47 +0000 (11:46 +0100)
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
test/meson.build
test/test-functions
test/testsuite-30.units/systemd-timedated.service.d/watchdog.conf [new file with mode: 0644]
test/units/testsuite-30.service [new file with mode: 0644]
test/units/testsuite-30.sh [moved from test/TEST-30-ONCLOCKCHANGE/testsuite.sh with 100% similarity]

index 9e2c11238c7a505556197988654e57f67f3db6de..5b4133202f36e9aa553706373f75d55b72fa6030 100755 (executable)
@@ -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 <<EOF
-[Service]
-WatchdogSec=10min
-EOF
-
-        # setup the testsuite service
-        cat >$initdir/etc/systemd/system/testsuite.service <<EOF
-[Unit]
-Description=Testsuite service
-
-[Service]
-ExecStart=/testsuite.sh
-Type=oneshot
-EOF
-        cp testsuite.sh $initdir/
-
-        setup_testsuite
     )
 }
 
-do_test "$@"
+do_test "$@" 30
index 6b85854d205f68308357e95f482befec69e97258..b347a0817d52420a307fbdc334313d477547fbde 100644 (file)
@@ -24,6 +24,8 @@ install_subdir('testsuite-16.units',
                install_dir : testdata_dir)
 install_subdir('testsuite-28.units',
                install_dir : testdata_dir)
+install_subdir('testsuite-30.units',
+               install_dir : testdata_dir)
 
 testsuite08_dir = testdata_dir + '/testsuite-08.units'
 install_data('testsuite-08.units/-.mount',
index dfc2573bdc400e1b964042f8350adb9af1f69705..ca01a81d8e81c4466660a0e7f49bcd1e06e77a8e 100644 (file)
@@ -839,6 +839,7 @@ install_config_files() {
     # we want an empty environment
     > $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 (file)
index 0000000..d5ed27c
--- /dev/null
@@ -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 (file)
index 0000000..c3bb258
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=TEST-30-ONCLOCKCHANGE
+
+[Service]
+ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
+Type=oneshot