From: Frantisek Sumsal Date: Thu, 4 Aug 2022 09:00:10 +0000 (+0200) Subject: test: skip the relevant test case if systemd-measure is not present X-Git-Tag: v252-rc1~518 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a552061ebb167386520a7aa8acef04409c6275a6;p=thirdparty%2Fsystemd.git test: skip the relevant test case if systemd-measure is not present systemd-measure is not built without gnu-efi, which is the case, for example, on ppc64le. Let's skip the relevant test case in this case instead of failing. ``` The Meson build system Version: 0.58.2 ... Host machine cpu family: ppc64 Host machine cpu: ppc64le ... Message: Skipping systemd-measure.1 because HAVE_GNU_EFI is false ... [ 115.711775] testsuite-70.sh[745]: + cat [ 115.741996] testsuite-70.sh[832]: + /usr/lib/systemd/systemd-measure calculate --linux=/tmp/tpmdata1 --initrd=/tmp/tpmdata2 [ 115.754015] testsuite-70.sh[833]: + cmp - /tmp/result [ 115.758004] testsuite-70.sh[832]: /usr/lib/systemd/tests/testdata/units/testsuite-70.sh: line 56: /usr/lib/systemd/systemd-measure: No such file or directory [ 115.773851] testsuite-70.sh[833]: cmp: EOF on - which is empty [ 115.983681] sh[835]: + systemctl poweroff --no-block ``` --- diff --git a/test/units/testsuite-70.sh b/test/units/testsuite-70.sh index f0bbee9436c..877359f4b09 100755 --- a/test/units/testsuite-70.sh +++ b/test/units/testsuite-70.sh @@ -43,17 +43,21 @@ env PASSWORD=passphrase systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+7 $ tpm2_pcrextend 0:sha256=0000000000000000000000000000000000000000000000000000000000000000 /usr/lib/systemd/systemd-cryptsetup attach test-volume $img - tpm2-device=auto,headless=1 && exit 1 -echo HALLO > /tmp/tpmdata1 -echo foobar > /tmp/tpmdata2 - -cat > /tmp/result < /tmp/tpmdata1 + echo foobar > /tmp/tpmdata2 + + cat >/tmp/result </testok