]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-40-EXEC-COMMAND-EX/test.sh
Merge pull request #11883 from yuwata/network-dhcp-renew
[thirdparty/systemd.git] / test / TEST-40-EXEC-COMMAND-EX / test.sh
CommitLineData
898fc00e
AZ
1#!/bin/bash
2set -e
3TEST_DESCRIPTION="test ExecXYZEx= service unit dbus hookups"
4
5. $TEST_BASE_DIR/test-functions
6
7test_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]
27Description=Testsuite service
28
29[Service]
30ExecStart=/testsuite.sh
31Type=oneshot
32StandardOutput=tty
33StandardError=tty
34NotifyAccess=all
35EOF
36 cp testsuite.sh $initdir/
37
38 setup_testsuite
39 )
40 setup_nspawn_root
41}
42
43do_test "$@"