diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-04-09 15:28:25 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2018-04-24 13:46:05 +0000 |
commit | 2f61bf81e908ccaa989a1e773fb193935b0eee43 (patch) | |
tree | 410a30b2b6c58d056dc7d3e976a1b3fc9675e49f /jenkins-common.sh | |
parent | 9f5131ab9d61279271e55165ae8f39a15a2edca7 (diff) |
jenkins.sh: have one common function to collect logs
To remove code dup and prepare a change to where logs are written, add
collect_logs() to jenkins_common.sh and call that from each jenkins.sh after
the tests are done.
The 'rm -rf' is already done before a test starts. No need to do that again
after each test.
Change-Id: I5d8472ec36b07c828685b1bd7718e31392d168a3
Diffstat (limited to 'jenkins-common.sh')
-rw-r--r-- | jenkins-common.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jenkins-common.sh b/jenkins-common.sh index bef68f6..281807a 100644 --- a/jenkins-common.sh +++ b/jenkins-common.sh @@ -10,7 +10,10 @@ network_remove() { docker network remove $NET_NAME } - +collect_logs() { + cp -a "$VOL_BASE_DIR"/* "$WORKSPACE"/logs/ + cat "$WORKSPACE"/logs/*/junit-*.log || true +} set -x |