fmf: Only move logs if corresponding directory exists

Otherwise find fails with an error.
This commit is contained in:
Daan De Meyer
2025-01-14 11:41:17 +01:00
parent 6309efbf31
commit 3c2fa8e050

View File

@@ -145,8 +145,8 @@ mkosi -f sandbox \
--no-stdsplit \
--num-processes "$NPROC" && EC=0 || EC=$?
find build/meson-logs -type f -exec mv {} "$TMT_TEST_DATA" \;
find build/test/journal -type f -exec mv {} "$TMT_TEST_DATA" \;
[[ -d build/meson-logs ]] && find build/meson-logs -type f -exec mv {} "$TMT_TEST_DATA" \;
[[ -d build/test/journal ]] && find build/test/journal -type f -exec mv {} "$TMT_TEST_DATA" \;
popd