]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-01-BASIC/test.sh
test: correctly mask supporting services in tests
[thirdparty/systemd.git] / test / TEST-01-BASIC / test.sh
CommitLineData
ff12a795 1#!/usr/bin/env bash
818567fc 2set -e
3f161ba9 3
898720b7 4TEST_DESCRIPTION="Basic systemd setup"
8c3534b5 5IMAGE_NAME="basic"
9103671d 6RUN_IN_UNPRIVILEGED_CONTAINER=${RUN_IN_UNPRIVILEGED_CONTAINER:-yes}
9d84eb20 7TEST_REQUIRE_INSTALL_TESTS=0
898720b7 8
3f161ba9
FS
9# shellcheck source=test/test-functions
10. "${TEST_BASE_DIR:?}/test-functions"
898720b7 11
179ca4d2
FS
12# Explicitly override the default test_create_image() function to avoid the
13# call to mask_supporting_services(), since we want to run them in TEST-01-BASIC
14test_create_image() {
15 create_empty_image_rootdir
16
17 # Create what will eventually be our root filesystem onto an overlay
18 (
19 LOG_LEVEL=5
20 setup_basic_environment
21 )
22}
23
d9e606e8
LB
24test_append_files() {
25 # install tests manually so the test is functional even when -Dinstall-tests=false
3f161ba9 26 local dst="${1:?}/usr/lib/systemd/tests/testdata/units/"
59b8cb3c 27 mkdir -p "$dst"
3f161ba9 28 cp -v "$TEST_UNITS_DIR"/{testsuite-01,end}.service "$TEST_UNITS_DIR/testsuite.target" "$dst"
898720b7
HH
29}
30
c4cd6205 31do_test "$@"