test: skip the relevant test case if systemd-measure is not present
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 4 Aug 2022 09:00:10 +0000 (11:00 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 4 Aug 2022 13:18:47 +0000 (13:18 +0000)
commita552061ebb167386520a7aa8acef04409c6275a6
tree225450fb2d53954c85f640384bbc21859992af26
parentc1178baacdf7df9c0f68593eb8d4089415facb38
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
```
test/units/testsuite-70.sh