]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-30-ONCLOCKCHANGE/test.sh
scripts: use 4 space indentation
[thirdparty/systemd.git] / test / TEST-30-ONCLOCKCHANGE / test.sh
CommitLineData
347da101 1#!/bin/bash
347da101
LP
2set -e
3TEST_DESCRIPTION="test OnClockChange= + OnTimezoneChange="
4TEST_NO_NSPAWN=1
5
6. $TEST_BASE_DIR/test-functions
7
8test_setup() {
9 create_empty_image
10 mkdir -p $TESTDIR/root
11 mount ${LOOPDEV}p1 $TESTDIR/root
12
13 (
14 LOG_LEVEL=5
15 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
16
17 inst_any /usr/share/zoneinfo/Europe/Kiev
18 inst_any /usr/share/zoneinfo/Europe/Berlin
19
20 setup_basic_environment
21
22 # mask some services that we do not want to run in these tests
23 ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
24 ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
25 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
26 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
27 ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
28 ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
29
a2fbac58 30 # extend the watchdog
8b0f4bac 31 mkdir -p $initdir/etc/systemd/system/systemd-timedated.service.d
a2fbac58
YW
32 cat >$initdir/etc/systemd/system/systemd-timedated.service.d/watchdog.conf <<EOF
33[Service]
34WatchdogSec=10min
35EOF
36
347da101
LP
37 # setup the testsuite service
38 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
39[Unit]
40Description=Testsuite service
41
42[Service]
43ExecStart=/testsuite.sh
44Type=oneshot
45StandardOutput=tty
46StandardError=tty
47NotifyAccess=all
48EOF
49 cp testsuite.sh $initdir/
50
51 setup_testsuite
52 ) || return 1
53
54 ddebug "umount $TESTDIR/root"
55 umount $TESTDIR/root
56}
57
58do_test "$@"