]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-27-STDOUTFILE/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-27-STDOUTFILE / test.sh
1 #!/bin/bash
2 set -e
3 TEST_DESCRIPTION="test StandardOutput=file:"
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 inst_binary cmp
17
18 # setup the testsuite service
19 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
20 [Unit]
21 Description=Testsuite service
22
23 [Service]
24 ExecStart=/testsuite.sh
25 Type=oneshot
26 EOF
27 cp testsuite.sh $initdir/
28
29 setup_testsuite
30 )
31 setup_nspawn_root
32 }
33
34 do_test "$@"