]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-22-TMPFILES/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-22-TMPFILES / test.sh
1 #!/bin/bash
2 set -e
3 TEST_DESCRIPTION="Tmpfiles related tests"
4 TEST_NO_QEMU=1
5
6 . $TEST_BASE_DIR/test-functions
7
8 test_setup() {
9 # create the basic filesystem layout
10 setup_basic_environment
11 mask_supporting_services
12 inst_binary mv
13 inst_binary stat
14 inst_binary seq
15 inst_binary xargs
16 inst_binary mkfifo
17 inst_binary readlink
18
19 # setup the testsuite service
20 cp testsuite.service $initdir/etc/systemd/system/
21 setup_testsuite
22
23 mkdir -p $initdir/testsuite
24 cp run-tmpfiles-tests.sh $initdir/testsuite/
25 cp test-*.sh $initdir/testsuite/
26
27 # create dedicated rootfs for nspawn (located in $TESTDIR/nspawn-root)
28 setup_nspawn_root
29 }
30
31 do_test "$@"