]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-40-EXEC-COMMAND-EX/test.sh
Merge pull request #13577 from yuwata/network-fix-ci-failure
[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
16 # mask some services that we do not want to run in these tests
17 ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
18 ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
19 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
20 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
21 ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
22 ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
23
24 # setup the testsuite service
25 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
26 [Unit]
27 Description=Testsuite service
28
29 [Service]
30 ExecStart=/testsuite.sh
31 Type=oneshot
32 StandardOutput=tty
33 StandardError=tty
34 NotifyAccess=all
35 EOF
36 cp testsuite.sh $initdir/
37
38 setup_testsuite
39 )
40 setup_nspawn_root
41 }
42
43 do_test "$@"