From b41de7ef2a815e2a44728991572ade69e3f973f4 Mon Sep 17 00:00:00 2001 From: div72 Date: Sun, 24 Dec 2023 20:37:08 +0300 Subject: [PATCH] ci: do not silently fail Rationale: 31722a225edaffabf247eb65afbb614f09fdbd52 changed the CI scripts to not output messages to the logs unless an err occurs to prevent exceeding CI runner log limits. A wrong assumption made by that commit causes the CI to not output the messages even if there's an error. This commit fixes that. --- ci/test_run_all.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ci/test_run_all.sh b/ci/test_run_all.sh index 618af9ff9f..b527771ba7 100755 --- a/ci/test_run_all.sh +++ b/ci/test_run_all.sh @@ -6,9 +6,14 @@ export LC_ALL=C.UTF-8 +# latest_stage.log will contain logs for a silenced stage if it +# fails. +trap "cat latest_stage.log" EXIT + set -o errexit; source ./ci/test/00_setup_env.sh set -o errexit; source ./ci/test/03_before_install.sh -set -o errexit; source ./ci/test/04_install.sh &> 04.log || (cat 04.log && exit 1) -set -o errexit; source ./ci/test/05_before_script.sh &> 05.log || (cat 05.log && exit 1) +set -o errexit; source ./ci/test/04_install.sh &> latest_stage.log +set -o errexit; source ./ci/test/05_before_script.sh &> latest_stage.log +echo -n > latest_stage.log set -o errexit; source ./ci/test/06_script_a.sh set -o errexit; source ./ci/test/06_script_b.sh