]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-20-MAINPIDGAMES/test.sh
test: drop redirection to tty in integration tests
[thirdparty/systemd.git] / test / TEST-20-MAINPIDGAMES / test.sh
CommitLineData
db256aab 1#!/bin/bash
db256aab
LP
2set -e
3TEST_DESCRIPTION="test changing main PID"
4
5. $TEST_BASE_DIR/test-functions
6
7test_setup() {
ec4cab49 8 create_empty_image_rootdir
db256aab
LP
9
10 (
11 LOG_LEVEL=5
12 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
13
14 setup_basic_environment
15
056ae881
YW
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
db256aab
LP
24 # setup the testsuite service
25 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
26[Unit]
27Description=Testsuite service
28
29[Service]
30ExecStart=/bin/bash -x /testsuite.sh
31Type=oneshot
db256aab
LP
32NotifyAccess=all
33EOF
34 cp testsuite.sh $initdir/
35
36 setup_testsuite
cc469c3d 37 )
db256aab 38 setup_nspawn_root
db256aab
LP
39}
40
41do_test "$@"