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