diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2020-08-28 15:17:31 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-02-10 19:54:12 +0100 |
commit | 9785c44dd83a44c2231316f912b4adf768a09f20 (patch) | |
tree | 6ef1479eb65da24bc2ea5ef6ec4d9ab2684a0e86 /test/TEST-50-DISSECT | |
parent | Merge pull request #18542 from yuwata/bash-completion-update (diff) | |
download | systemd-9785c44dd83a44c2231316f912b4adf768a09f20.tar.xz systemd-9785c44dd83a44c2231316f912b4adf768a09f20.zip |
test-50-dissect: move minimal image setup to common setup function
So that it can be re-used for other tests by simply setting
TEST_INSTALL_VERITY_MINIMAL=1 in test.sh, without having to
replicate the setup commands.
Diffstat (limited to 'test/TEST-50-DISSECT')
-rwxr-xr-x | test/TEST-50-DISSECT/test.sh | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/test/TEST-50-DISSECT/test.sh b/test/TEST-50-DISSECT/test.sh index c9e4faf5cb..2ff81bf4fa 100755 --- a/test/TEST-50-DISSECT/test.sh +++ b/test/TEST-50-DISSECT/test.sh @@ -5,11 +5,10 @@ set -e TEST_DESCRIPTION="test systemd-dissect" IMAGE_NAME="dissect" TEST_NO_NSPAWN=1 +TEST_INSTALL_VERITY_MINIMAL=1 . $TEST_BASE_DIR/test-functions -command -v mksquashfs >/dev/null 2>&1 || exit 0 -command -v veritysetup >/dev/null 2>&1 || exit 0 command -v sfdisk >/dev/null 2>&1 || exit 0 # Need loop devices for systemd-dissect @@ -21,23 +20,7 @@ test_append_files() { install_dmevent generate_module_dependencies inst_binary losetup - - BASICTOOLS=( - bash - cat - mount - ) - oldinitdir=$initdir - export initdir=$TESTDIR/minimal - mkdir -p $initdir/usr/lib $initdir/etc - setup_basic_dirs - install_basic_tools - cp $os_release $initdir/usr/lib/os-release - ln -s ../usr/lib/os-release $initdir/etc/os-release - echo MARKER=1 >> $initdir/usr/lib/os-release - mksquashfs $initdir $oldinitdir/usr/share/minimal.raw - veritysetup format $oldinitdir/usr/share/minimal.raw $oldinitdir/usr/share/minimal.verity | grep '^Root hash:' | cut -f2 | tr -d '\n' > $oldinitdir/usr/share/minimal.roothash - export initdir=$oldinitdir + install_verity_minimal ) } |