@@ -68,6 +68,28 @@ def gobuild_step(list) {
68
68
}
69
69
}
70
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
+
71
93
/* PIPELINE */
72
94
73
95
ansiColor(' xterm' ) { withEnv([' TERM=xterm-color' ]) {
@@ -140,36 +162,12 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
140
162
},
141
163
linuxSharness : {
142
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 )
155
166
}
156
167
},
157
168
macOS : {
158
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 )
173
171
}
174
172
},
175
173
macSharness : {
0 commit comments