ci: archive sharness trash dirs
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
Łukasz Magiera committed
Jun 3, 2018 at 21:06 UTC
39b76d56db67760d44fe61df6893eabce37c0a41
1 file changed
+24
-26
ci/Jenkinsfile
+24
-26
@@ -68,6 +68,28 @@ def gobuild_step(list) {
68
}
69
}
70
71
+def sharness_step = { run, osname, makeargs, ignore ->
72
+ timeout(time: sharness_timeout, unit: 'MINUTES') {
73
+ run "make gx-deps"
74
+
75
+ try {
76
+ run "make -j12 ${makeargs} test/sharness/test-results/sharness.xml CONTINUE_ON_S_FAILURE=1 TEST_NO_FUSE=1 TEST_NO_DOCKER=1"
77
+
78
+ try {
79
+ // archive trash directories if any
80
+ run "tar -czf sharnessTrashDirs-${osname}.tar.gz test/sharness/trash\\ *"
81
+ archiveArtifacts artifacts: "sharnessTrashDirs-${osname}.tar.gz", fingerprint: true
82
+ } catch (_) {}
83
+ } catch (err) {
84
+ throw err
85
+ } finally {
86
+ if (!ignore) {
87
+ junit allowEmptyResults: true, testResults: 'test/sharness/test-results/sharness.xml'
88
+ }
89
+ }
90
+ }
91
+}
92
+
93
/* PIPELINE */
94
95
ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
@@ -140,36 +162,12 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
162
},
163
linuxSharness: {
164
setupStep('linux') { run ->
143
- timeout(time: sharness_timeout, unit: 'MINUTES') {
144
- run 'go get -v github.com/jstemmer/go-junit-report'
145
- run "make gx-deps"
146
-
147
- try {
148
- run "make -j12 -Otarget test/sharness/test-results/sharness.xml CONTINUE_ON_S_FAILURE=1 TEST_NO_FUSE=1 TEST_NO_DOCKER=1"
149
- } catch (err) {
150
- throw err
151
- } finally {
152
- junit allowEmptyResults: true, testResults: 'test/sharness/test-results/sharness.xml'
153
- }
154
- }
165
+ sharness_step(run, 'linux', '-Otarget', false)
166
}
167
},
168
//macOS: {
169
// setupStep('macos') { run ->
159
- // timeout(time: gotest_timeout, unit: 'MINUTES') {
160
- // run 'go get -v github.com/jstemmer/go-junit-report'
161
- // run "make gx-deps"
162
-
163
- // try {
164
- // run test + ' -tags="nofuse" 2>&1 | tee output'
165
- // run 'cat output | go-junit-report > junit-report-macos.xml'
166
- // } catch (err) {
167
- // throw err
168
- // } finally {
169
- // /* IGNORE TEST FAILS */
170
- // /* junit 'junit-report-*.xml' */
171
- // }
172
- // }
170
+ // sharness_step(run, 'macos', '', true)
171
// }
172
//},
173
//macSharness: {