Skip to content

Commit

Permalink
ci: archive sharness trash dirs
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
  • Loading branch information
magik6k committed Jun 4, 2018
1 parent f7a9809 commit 6416075
Showing 1 changed file with 22 additions and 26 deletions.
48 changes: 22 additions & 26 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,26 @@ def gobuild_step(list) {
}
}

def sharness_step = { run, osname, makeargs ->
timeout(time: sharness_timeout, unit: 'MINUTES') {
run "make gx-deps"

try {
run "make -j12 ${makeargs} test/sharness/test-results/sharness.xml CONTINUE_ON_S_FAILURE=1 TEST_NO_FUSE=1 TEST_NO_DOCKER=1"

try {
// archive trash directories if any
run "tar -czf sharnessTrashDirs-${osname}.tar.gz test/sharness/trash\\ *"
archiveArtifacts artifacts: "sharnessTrashDirs-${osname}.tar.gz", fingerprint: true
} catch (_) {}
} catch (err) {
throw err
} finally {
junit allowEmptyResults: true, testResults: 'test/sharness/test-results/sharness.xml'
}
}
}

/* PIPELINE */

ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
Expand Down Expand Up @@ -140,36 +160,12 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
},
linuxSharness: {
setupStep('linux') { run ->
timeout(time: sharness_timeout, unit: 'MINUTES') {
run 'go get -v github.com/jstemmer/go-junit-report'
run "make gx-deps"

try {
run "make -j12 -Otarget test/sharness/test-results/sharness.xml CONTINUE_ON_S_FAILURE=1 TEST_NO_FUSE=1 TEST_NO_DOCKER=1"
} catch (err) {
throw err
} finally {
junit allowEmptyResults: true, testResults: 'test/sharness/test-results/sharness.xml'
}
}
sharness_step(run, 'linux', '-Otarget')
}
},
macOS: {
setupStep('macos') { run ->
timeout(time: gotest_timeout, unit: 'MINUTES') {
run 'go get -v github.com/jstemmer/go-junit-report'
run "make gx-deps"

try {
run test + ' -tags="nofuse" 2>&1 | tee output'
run 'cat output | go-junit-report > junit-report-macos.xml'
} catch (err) {
throw err
} finally {
/* IGNORE TEST FAILS */
/* junit 'junit-report-*.xml' */
}
}
sharness_step(run, 'macos', '')
}
},
macSharness: {
Expand Down

0 comments on commit 6416075

Please sign in to comment.