]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-23-TYPE-EXEC/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-23-TYPE-EXEC / test.sh
CommitLineData
0e1f1756 1#!/bin/bash
0e1f1756
LP
2set -e
3TEST_DESCRIPTION="test Type=exec"
4
5. $TEST_BASE_DIR/test-functions
6
7test_setup() {
ec4cab49 8 create_empty_image_rootdir
0e1f1756
LP
9
10 (
11 LOG_LEVEL=5
12 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
13
14 setup_basic_environment
51fa8591 15 mask_supporting_services
056ae881 16
0e1f1756
LP
17 # setup the testsuite service
18 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
19[Unit]
20Description=Testsuite service
21
22[Service]
23ExecStart=/testsuite.sh
24Type=oneshot
0e1f1756
LP
25EOF
26 cp testsuite.sh $initdir/
27
28 setup_testsuite
cc469c3d 29 )
0e1f1756 30 setup_nspawn_root
0e1f1756
LP
31}
32
33do_test "$@"