]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-03-JOBS/test.sh
test: drop redirection to tty in integration tests
[thirdparty/systemd.git] / test / TEST-03-JOBS / test.sh
CommitLineData
b5da077d 1#!/bin/bash
818567fc 2set -e
d710d363 3TEST_DESCRIPTION="Job-related tests"
3edc0c59 4TEST_NO_QEMU=1
b5da077d 5
fff87a35 6. $TEST_BASE_DIR/test-functions
b5da077d 7
b5da077d 8test_setup() {
ec4cab49 9 create_empty_image_rootdir
b5da077d
MS
10
11 # Create what will eventually be our root filesystem onto an overlay
12 (
13 LOG_LEVEL=5
b5da077d
MS
14 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
15
889a9042 16 setup_basic_environment
b5da077d 17
056ae881
YW
18 # mask some services that we do not want to run in these tests
19 ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
20 ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
21 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
22 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
23 ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
24 ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
25
b5da077d
MS
26 # setup the testsuite service
27 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
28[Unit]
29Description=Testsuite service
30After=multi-user.target
31
32[Service]
33ExecStart=/test-jobs.sh
34Type=oneshot
35EOF
36
37 # copy the units used by this test
d710d363
MS
38 cp $TEST_BASE_DIR/{hello.service,sleep.service,hello-after-sleep.target,unstoppable.service} \
39 $initdir/etc/systemd/system
b5da077d
MS
40 cp test-jobs.sh $initdir/
41
889a9042 42 setup_testsuite
cc469c3d 43 )
889a9042 44 setup_nspawn_root
b5da077d
MS
45}
46
b5da077d 47do_test "$@"