]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-04-JOURNAL/test.sh
treewide: more portable bash shebangs
[thirdparty/systemd.git] / test / TEST-04-JOURNAL / test.sh
CommitLineData
ff12a795 1#!/usr/bin/env bash
818567fc 2set -e
1c36b4a7
EV
3TEST_DESCRIPTION="Journal-related tests"
4
5. $TEST_BASE_DIR/test-functions
6
1c36b4a7 7test_setup() {
ec4cab49 8 create_empty_image_rootdir
1c36b4a7
EV
9
10 # Create what will eventually be our root filesystem onto an overlay
11 (
12 LOG_LEVEL=5
13 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
14
15 setup_basic_environment
51fa8591 16 mask_supporting_services
056ae881 17
1c36b4a7
EV
18 # setup the testsuite service
19 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
20[Unit]
21Description=Testsuite service
1c36b4a7
EV
22
23[Service]
24ExecStart=/test-journal.sh
25Type=oneshot
3889613e
EV
26EOF
27
28 cat >$initdir/etc/systemd/system/forever-print-hola.service <<EOF
29[Unit]
30Description=ForeverPrintHola service
31
32[Service]
33Type=simple
34ExecStart=/bin/sh -x -c 'while :; do printf "Hola\n" || touch /i-lose-my-logs; sleep 1; done'
1c36b4a7
EV
35EOF
36
37 cp test-journal.sh $initdir/
38
39 setup_testsuite
cc469c3d 40 )
1c36b4a7 41 setup_nspawn_root
1c36b4a7
EV
42}
43
1c36b4a7 44do_test "$@"