]>
Commit | Line | Data |
---|---|---|
ff12a795 | 1 | #!/usr/bin/env bash |
818567fc | 2 | set -e |
1c36b4a7 EV |
3 | TEST_DESCRIPTION="Journal-related tests" |
4 | ||
5 | . $TEST_BASE_DIR/test-functions | |
6 | ||
1c36b4a7 | 7 | test_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] | |
21 | Description=Testsuite service | |
1c36b4a7 EV |
22 | |
23 | [Service] | |
24 | ExecStart=/test-journal.sh | |
25 | Type=oneshot | |
3889613e EV |
26 | EOF |
27 | ||
28 | cat >$initdir/etc/systemd/system/forever-print-hola.service <<EOF | |
29 | [Unit] | |
30 | Description=ForeverPrintHola service | |
31 | ||
32 | [Service] | |
33 | Type=simple | |
34 | ExecStart=/bin/sh -x -c 'while :; do printf "Hola\n" || touch /i-lose-my-logs; sleep 1; done' | |
1c36b4a7 EV |
35 | EOF |
36 | ||
37 | cp test-journal.sh $initdir/ | |
38 | ||
39 | setup_testsuite | |
cc469c3d | 40 | ) |
1c36b4a7 | 41 | setup_nspawn_root |
1c36b4a7 EV |
42 | } |
43 | ||
1c36b4a7 | 44 | do_test "$@" |