base_tests.sh: make the test self-contained
We claim to have self-contained test cases, but the base_tests.sh script still requires the WORKSPACE environment variable to be set outside of the script, which is what Jenkins does. This patch replaces WORKSPACE with a temporary directory and modifies Jenkinsfile to use it when collecting logs.
This commit is contained in:
parent
6962c4d8e6
commit
1b4db3377b
2 changed files with 5 additions and 1 deletions
2
schutzbot/Jenkinsfile
vendored
2
schutzbot/Jenkinsfile
vendored
|
|
@ -351,6 +351,8 @@ void preserve_logs(test_slug) {
|
|||
|
||||
// Make a directory for the log files and move the logs there.
|
||||
sh "mkdir ${test_slug} && mv *.log *.jpg ${test_slug}/ || true"
|
||||
// The workspace directory is not used everywhere, tests use temporary directory under /tmp/logs.
|
||||
sh "mkdir -p ${test_slug} && find /tmp/logs/ -name '*.log' -exec mv {} ${test_slug}/ \\; || true"
|
||||
|
||||
// Artifact the logs.
|
||||
archiveArtifacts (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue