aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--test-suite/Makefile7
-rwxr-xr-xtest-suite/save-logs.sh18
3 files changed, 24 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3b1ea0d1f..a6a27194a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -104,13 +104,11 @@ before_script:
- make clean
# careful with the ending /
- make -j ${NJOBS} BIN=$(readlink -f ../install/bin)/ LIB=$(readlink -f ../install/lib/coq)/ all
- after_script:
- - test-suite/save-logs.sh
artifacts:
name: "$CI_JOB_NAME.logs"
when: on_failure
paths:
- - logs
+ - test-suite/logs
.validate-template: &validate-template
stage: test
diff --git a/test-suite/Makefile b/test-suite/Makefile
index 285460762..cc635dd13 100644
--- a/test-suite/Makefile
+++ b/test-suite/Makefile
@@ -68,6 +68,7 @@ ifeq (,$(bogomips))
$(warning cannot run complexity tests (no bogomips found))
endif
+# keep these synced with test-suite/save-logs.sh
log_success = "==========> SUCCESS <=========="
log_segfault = "==========> FAILURE <=========="
log_anomaly = "==========> FAILURE <=========="
@@ -164,7 +165,13 @@ summary.log:
$(SHOW) BUILDING SUMMARY FILE
$(HIDE)$(MAKE) --quiet summary > "$@"
+# if not on travis we can get the log files (they're just there for a
+# local build, and downloadable on GitLab)
report: summary.log
+ $(HIDE)./save-logs.sh
+ $(HIDE)if [ -n "${TRAVIS}" ]; then echo 'travis_fold:start:coq.logs'; fi
+ $(HIDE)if [ -n "${TRAVIS}" ]; then find logs/ -name '*.log' -not -name 'summary.log' -exec cat '{}' ';'; fi
+ $(HIDE)if [ -n "${TRAVIS}" ]; then echo 'travis_fold:end:coq.logs'; fi
$(HIDE)if grep -q -F 'Error!' summary.log ; then echo FAILURES; grep -F 'Error!' summary.log; false; else echo NO FAILURES; fi
#######################################################################
diff --git a/test-suite/save-logs.sh b/test-suite/save-logs.sh
index 131bcf545..fb8a1c1b0 100755
--- a/test-suite/save-logs.sh
+++ b/test-suite/save-logs.sh
@@ -1,5 +1,19 @@
#!/usr/bin/env bash
-WHERE="logs"
+SAVEDIR="logs"
-rsync -a --from0 --files-from=<(find . -name '*.log' -print0) . "$WHERE"
+# reset for local builds
+rm -rf "$SAVEDIR"
+mkdir "$SAVEDIR"
+
+# keep this synced with test-suite/Makefile
+FAILMARK="==========> FAILURE <=========="
+
+FAILED=$(mktemp)
+find . '(' -path ./bugs/opened -prune ')' -o '(' -name '*.log' -exec grep "$FAILMARK" -q '{}' ';' -print0 ')' > "$FAILED"
+
+rsync -a --from0 --files-from="$FAILED" . "$SAVEDIR"
+cp summary.log "$SAVEDIR"/
+
+# cleanup
+rm "$FAILED"