]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-50-DISSECT/test.sh
tests: add spdx headers to scripts and Makefiles
[thirdparty/systemd.git] / test / TEST-50-DISSECT / test.sh
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
4 # ex: ts=8 sw=4 sts=4 et filetype=sh
5 set -e
6
7 TEST_DESCRIPTION="test systemd-dissect"
8 IMAGE_NAME="dissect"
9 TEST_NO_NSPAWN=1
10 TEST_INSTALL_VERITY_MINIMAL=1
11
12 # shellcheck source=test/test-functions
13 . "${TEST_BASE_DIR:?}/test-functions"
14
15 QEMU_TIMEOUT=300
16
17 command -v mksquashfs >/dev/null 2>&1 || exit 0
18 command -v veritysetup >/dev/null 2>&1 || exit 0
19 command -v sfdisk >/dev/null 2>&1 || exit 0
20
21 # Need loop devices for systemd-dissect
22 test_append_files() {
23 (
24 instmods loop =block
25 instmods squashfs =squashfs
26 instmods dm_verity =md
27 instmods overlay =overlayfs
28 install_dmevent
29 generate_module_dependencies
30 inst_binary losetup
31 inst_binary wc
32 if command -v openssl >/dev/null 2>&1; then
33 inst_binary openssl
34 fi
35 install_verity_minimal
36 )
37 }
38
39 do_test "$@"