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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-12-10 13:45:48 +01:00
parent e578ea4df4
commit 7eeeab205d
6 changed files with 12 additions and 24 deletions

View File

@ -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

View 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',

View 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

View File

@ -0,0 +1,2 @@
[Service]
WatchdogSec=10min

View File

@ -0,0 +1,6 @@
[Unit]
Description=TEST-30-ONCLOCKCHANGE
[Service]
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot