]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-27-STDOUTFILE/test.sh
scripts: use 4 space indentation
[thirdparty/systemd.git] / test / TEST-27-STDOUTFILE / test.sh
CommitLineData
196b0a11 1#!/bin/bash
196b0a11
LP
2set -e
3TEST_DESCRIPTION="test StandardOutput=file:"
4
5. $TEST_BASE_DIR/test-functions
6
7test_setup() {
8 create_empty_image
9 mkdir -p $TESTDIR/root
10 mount ${LOOPDEV}p1 $TESTDIR/root
11
12 (
13 LOG_LEVEL=5
14 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
15
16 inst_binary cmp
17
18 setup_basic_environment
19
20 # mask some services that we do not want to run in these tests
21 ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
22 ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
23 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
24 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
25 ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
26 ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
27
28 # setup the testsuite service
29 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
30[Unit]
31Description=Testsuite service
32
33[Service]
34ExecStart=/testsuite.sh
35Type=oneshot
36StandardOutput=tty
37StandardError=tty
38NotifyAccess=all
39EOF
40 cp testsuite.sh $initdir/
41
42 setup_testsuite
43 ) || return 1
44 setup_nspawn_root
45
46 ddebug "umount $TESTDIR/root"
47 umount $TESTDIR/root
48}
49
50do_test "$@"