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