]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-30-ONCLOCKCHANGE/test.sh
test: add function to reduce copied setup boilerplate
[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() {
ec4cab49 9 create_empty_image_rootdir
347da101
LP
10
11 (
12 LOG_LEVEL=5
13 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
14
15 inst_any /usr/share/zoneinfo/Europe/Kiev
16 inst_any /usr/share/zoneinfo/Europe/Berlin
17
18 setup_basic_environment
51fa8591 19 mask_supporting_services
347da101 20
a2fbac58 21 # extend the watchdog
8b0f4bac 22 mkdir -p $initdir/etc/systemd/system/systemd-timedated.service.d
a2fbac58
YW
23 cat >$initdir/etc/systemd/system/systemd-timedated.service.d/watchdog.conf <<EOF
24[Service]
25WatchdogSec=10min
26EOF
27
347da101
LP
28 # setup the testsuite service
29 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
30[Unit]
31Description=Testsuite service
32
33[Service]
34ExecStart=/testsuite.sh
35Type=oneshot
347da101
LP
36EOF
37 cp testsuite.sh $initdir/
38
39 setup_testsuite
cc469c3d 40 )
347da101
LP
41}
42
43do_test "$@"