diff --git a/ci/ci-build.sh b/ci/ci-build.sh index 662201ea..606732bf 100755 --- a/ci/ci-build.sh +++ b/ci/ci-build.sh @@ -3,8 +3,12 @@ log_content() { echo - echo "Content of $1:" - cat "$1" + if [ -f "$1" ]; then + echo "Content of $1:" + cat "$1" + else + echo "Log file $1 not found." + fi } error_handler() diff --git a/ci/ci-meson-build.sh b/ci/ci-meson-build.sh index 1e86f86c..1d8bfd77 100755 --- a/ci/ci-meson-build.sh +++ b/ci/ci-meson-build.sh @@ -9,10 +9,12 @@ error_handler() echo echo "Error ${ERR_CODE} with command '${BASH_COMMAND}' on line ${BASH_LINENO[0]}. Exiting." # Meson logs are stored in the build directory - if [ -f "build/meson-logs/testlog.txt" ]; then - echo "--- Meson Test Log ---" - cat build/meson-logs/testlog.txt - fi + for log in build_run/meson-logs/testlog.txt build_valgrind/meson-logs/testlog.txt; do + if [ -f "$log" ]; then + echo "--- Meson Test Log ($log) ---" + cat "$log" + fi + done exit ${ERR_CODE} }