]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-16-EXTEND-TIMEOUT/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-16-EXTEND-TIMEOUT / test.sh
1 #!/bin/bash
2 set -e
3 TEST_DESCRIPTION="EXTEND_TIMEOUT_USEC=usec start/runtime/stop tests"
4 SKIP_INITRD=yes
5 TEST_NO_QEMU=1
6
7 . $TEST_BASE_DIR/test-functions
8
9 test_setup() {
10 create_empty_image
11
12 # Create what will eventually be our root filesystem onto an overlay
13 (
14 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
15
16 setup_basic_environment
17 mask_supporting_services
18
19 for s in success-all success-start success-stop success-runtime \
20 fail-start fail-stop fail-runtime
21 do
22 cp testsuite-${s}.service ${initdir}/etc/systemd/system
23 done
24 cp testsuite.service ${initdir}/etc/systemd/system
25
26 cp extend_timeout_test_service.sh ${initdir}/
27 cp assess.sh ${initdir}/
28
29 setup_testsuite
30 )
31
32 setup_nspawn_root
33 }
34
35 do_test "$@"