Skip to content

Commit

Permalink
[gitlab] Artifact test suite logs on failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaëtan Gilbert committed May 30, 2017
1 parent fd36c04 commit 6b4a570
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .gitlab-ci.yml
Expand Up @@ -100,13 +100,17 @@ before_script:
.test-suite-template: &test-suite-template
stage: test
script:
- set -e
- cd test-suite
- make clean
# careful with the ending /
- make -j ${NJOBS} BIN=$(readlink -f ../install/bin)/ LIB=$(readlink -f ../install/lib/coq)/ all
- cat summary.log
- set +e
after_script:
- test-suite/save-logs.sh
artifacts:
name: "$CI_JOB_NAME.logs"
when: on_failure
paths:
- logs

.validate-template: &validate-template
stage: test
Expand Down
5 changes: 5 additions & 0 deletions test-suite/save-logs.sh
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

WHERE="logs"

rsync -a --from0 --files-from=<(find . -name '*.log' -print0) . "$WHERE"

0 comments on commit 6b4a570

Please sign in to comment.