{build|unit}-test: show meson-log.txt when meson fails

to make it easier to figure out why it fails.

For example in https://github.com/systemd/systemd/runs/4799774735?check_suite_focus=true
it failed with
```

meson.build:1003:8: ERROR: Command "/usr/bin/clang -print-targets" failed with status 1.

A full log can be found at /home/runner/work/systemd/systemd/build/meson-logs/meson-log.txt
Error: Process completed with exit code 1.
```
and it wasn't clear what exactly happened there.
This commit is contained in:
Evgeny Vereshchagin
2022-01-13 20:27:25 +09:00
committed by Yu Watanabe
parent d2ceeb624c
commit 4e1ab496ae
2 changed files with 11 additions and 3 deletions
+2 -1
View File
@@ -125,10 +125,11 @@ for args in "${ARGS[@]}"; do
meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
-Dcryptolib="${CRYPTOLIB:?}" $args build; then
cat build/meson-logs/meson-log.txt
fatal "meson failed with $args"
fi
if ! meson compile -C build; then
if ! meson compile -C build -v; then
fatal "'meson compile' failed with $args"
fi