]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-19-DELEGATE/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-19-DELEGATE / test.sh
1 #!/bin/bash
2 set -e
3 TEST_DESCRIPTION="test cgroup delegation in the unified hierarchy"
4 TEST_NO_NSPAWN=1
5
6 . $TEST_BASE_DIR/test-functions
7 QEMU_TIMEOUT=600
8 UNIFIED_CGROUP_HIERARCHY=yes
9
10 test_setup() {
11 create_empty_image_rootdir
12
13 (
14 LOG_LEVEL=5
15 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
16
17 setup_basic_environment
18 mask_supporting_services
19
20 # setup the testsuite service
21 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
22 [Unit]
23 Description=Testsuite service
24
25 [Service]
26 ExecStart=/bin/bash -x /testsuite.sh
27 Type=oneshot
28 EOF
29 cp testsuite.sh $initdir/
30
31 setup_testsuite
32 )
33 }
34
35 do_test "$@"