]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-04-JOURNAL/test.sh
Merge pull request #31899 from yuwata/sd-journal-add-match
[thirdparty/systemd.git] / test / TEST-04-JOURNAL / test.sh
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 set -e
4
5 TEST_DESCRIPTION="Journal-related tests"
6
7 # shellcheck source=test/test-functions
8 . "${TEST_BASE_DIR:?}/test-functions"
9
10 test_append_files() {
11 local workspace="${1:?}"
12 local dropin_dir
13
14 image_install curl setterm unzstd
15 image_install -o openssl
16 # Necessary for RH-based systems, otherwise MHD fails with:
17 # microhttpd: Failed to initialise TLS session.
18 image_install -o /etc/crypto-policies/back-ends/gnutls.config
19
20 # Since we nuke the journal repeatedly during this test, let's redirect
21 # stdout/stderr to the console as well to make the test a bit more debug-able.
22 if ! get_bool "${INTERACTIVE_DEBUG:-}"; then
23 dropin_dir="${workspace:?}/etc/systemd/system/testsuite-04.service.d/"
24 mkdir -p "$dropin_dir"
25 printf '[Service]\nStandardOutput=journal+console\nStandardError=journal+console' >"$dropin_dir/99-stdout.conf"
26 fi
27 }
28
29 do_test "$@"