@@ -33,6 +33,9 @@ MAXIMUM_ERLANG_VERSION = '28.3.2'
3333// works.
3434INTERMEDIATE_ERLANG_VERSION = ' 27.3.4.8'
3535
36+ // Default GNU Make Eunit Options for supported platforms
37+ DEFAULT_GNU_MAKE_EUNIT_OPTS = ' -j4 --output-sync=target'
38+
3639// Use these to detect if just documents changed
3740docs_changed = " git diff --name-only origin/${ env.CHANGE_TARGET} | grep -q '^src/docs/'"
3841github_changed = " git diff --name-only origin/${ env.CHANGE_TARGET} | grep -q '^.github'"
@@ -48,7 +51,8 @@ meta = [
4851 with_clouseau : false ,
4952 clouseau_java_home : ' /usr' ,
5053 quickjs_test262 : true ,
51- image : " apache/couchdbci-centos:8-erlang-${ ERLANG_VERSION} "
54+ image : " apache/couchdbci-centos:8-erlang-${ ERLANG_VERSION} " ,
55+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
5256 ],
5357
5458 ' centos9' : [
@@ -58,7 +62,8 @@ meta = [
5862 with_clouseau : false ,
5963 clouseau_java_home : ' /usr' ,
6064 quickjs_test262 : true ,
61- image : " apache/couchdbci-centos:9-erlang-${ ERLANG_VERSION} "
65+ image : " apache/couchdbci-centos:9-erlang-${ ERLANG_VERSION} " ,
66+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
6267 ],
6368
6469 ' centos10' : [
@@ -68,7 +73,8 @@ meta = [
6873 with_clouseau : false ,
6974 clouseau_java_home : ' /usr' ,
7075 quickjs_test262 : true ,
71- image : " apache/couchdbci-centos:10-erlang-${ ERLANG_VERSION} "
76+ image : " apache/couchdbci-centos:10-erlang-${ ERLANG_VERSION} " ,
77+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
7278 ],
7379
7480 ' jammy' : [
@@ -78,7 +84,8 @@ meta = [
7884 with_clouseau : false ,
7985 clouseau_java_home : ' /opt/java/openjdk' ,
8086 quickjs_test262 : true ,
81- image : " apache/couchdbci-ubuntu:jammy-erlang-${ ERLANG_VERSION} "
87+ image : " apache/couchdbci-ubuntu:jammy-erlang-${ ERLANG_VERSION} " ,
88+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
8289 ],
8390
8491 ' noble' : [
@@ -88,7 +95,8 @@ meta = [
8895 with_clouseau : false ,
8996 clouseau_java_home : ' /opt/java/openjdk' ,
9097 quickjs_test262 : true ,
91- image : " apache/couchdbci-ubuntu:noble-erlang-${ ERLANG_VERSION} "
98+ image : " apache/couchdbci-ubuntu:noble-erlang-${ ERLANG_VERSION} " ,
99+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
92100 ],
93101
94102 ' bullseye' : [
@@ -98,7 +106,8 @@ meta = [
98106 with_clouseau : false ,
99107 clouseau_java_home : ' /opt/java/openjdk' ,
100108 quickjs_test262 : true ,
101- image : " apache/couchdbci-debian:bullseye-erlang-${ ERLANG_VERSION} "
109+ image : " apache/couchdbci-debian:bullseye-erlang-${ ERLANG_VERSION} " ,
110+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
102111 ],
103112
104113 // Sometimes we "pick up" ppc64le workers from the asf jenkins intance That
@@ -115,7 +124,8 @@ meta = [
115124 // with_clouseau: true,
116125 // quickjs_test262: true,
117126 // image: "${DOCKER_IMAGE_BASE}-${ERLANG_VERSION}",
118- // node_label: 'ppc64le'
127+ // node_label: 'ppc64le',
128+ // gnu_make_eunit_opts: '${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
119129 // ],
120130
121131 // Just like in the ppc64le case we sometimes "pick up" built-in s390x workers added to
@@ -131,7 +141,8 @@ meta = [
131141 // // Test262Error: 51539607552,42,0,4,5,6,7,8
132142 // quickjs_test262: false,
133143 // image: "${DOCKER_IMAGE_BASE}-${ERLANG_VERSION}",
134- // node_label: 's390x'
144+ // node_label: 's390x',
145+ // gnu_make_eunit_opts: '${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
135146 // ],
136147
137148 ' base' : [
@@ -142,7 +153,8 @@ meta = [
142153 clouseau_java_home : ' /opt/java/openjdk' ,
143154 // Test this in in the bookworm-quickjs variant
144155 quickjs_test262 : false ,
145- image : " ${ DOCKER_IMAGE_BASE} -${ ERLANG_VERSION} "
156+ image : " ${ DOCKER_IMAGE_BASE} -${ ERLANG_VERSION} " ,
157+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
146158 ],
147159
148160 ' base-max-erlang' : [
@@ -152,7 +164,8 @@ meta = [
152164 with_clouseau : false ,
153165 clouseau_java_home : ' /opt/java/openjdk' ,
154166 quickjs_test262 : false ,
155- image : " ${ DOCKER_IMAGE_BASE} -${ MAXIMUM_ERLANG_VERSION} "
167+ image : " ${ DOCKER_IMAGE_BASE} -${ MAXIMUM_ERLANG_VERSION} " ,
168+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
156169 ],
157170
158171 ' base-intermediate-erlang' : [
@@ -162,7 +175,8 @@ meta = [
162175 with_clouseau : false ,
163176 clouseau_java_home : ' /opt/java/openjdk' ,
164177 quickjs_test262 : false ,
165- image : " ${ DOCKER_IMAGE_BASE} -${ INTERMEDIATE_ERLANG_VERSION} "
178+ image : " ${ DOCKER_IMAGE_BASE} -${ INTERMEDIATE_ERLANG_VERSION} " ,
179+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
166180 ],
167181
168182 ' base-quickjs' : [
@@ -172,7 +186,8 @@ meta = [
172186 with_clouseau : false ,
173187 clouseau_java_home : ' /opt/java/openjdk' ,
174188 quickjs_test262 : true ,
175- image : " ${ DOCKER_IMAGE_BASE} -${ ERLANG_VERSION} "
189+ image : " ${ DOCKER_IMAGE_BASE} -${ ERLANG_VERSION} " ,
190+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
176191 ],
177192
178193 // This runs on a docker ARM64 host. Normally we should be able to run all
@@ -192,7 +207,8 @@ meta = [
192207 // Test this in in the bookworm-quickjs variant
193208 quickjs_test262 : false ,
194209 image : " ${ DOCKER_IMAGE_BASE} -${ ERLANG_VERSION} " ,
195- node_label : ' docker-arm64'
210+ node_label : ' docker-arm64' ,
211+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
196212 ],
197213
198214 ' trixie' : [
@@ -202,7 +218,8 @@ meta = [
202218 with_clouseau : false ,
203219 clouseau_java_home : ' /opt/java/openjdk' ,
204220 quickjs_test262 : true ,
205- image : " apache/couchdbci-debian:trixie-erlang-${ ERLANG_VERSION} "
221+ image : " apache/couchdbci-debian:trixie-erlang-${ ERLANG_VERSION} " ,
222+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
206223 ],
207224
208225 ' freebsd-x86_64' : [
@@ -211,7 +228,8 @@ meta = [
211228 with_clouseau : true ,
212229 clouseau_java_home : ' /usr/local/openjdk21' ,
213230 quickjs_test262 : false ,
214- gnu_make : ' gmake'
231+ gnu_make : ' gmake' ,
232+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
215233 ],
216234
217235 // Spidermonkey 91 has issues on ARM64 FreeBSD
@@ -223,7 +241,8 @@ meta = [
223241 // with_clouseau: true,
224242 // clouseau_java_home: '/usr/local/openjdk21',
225243 // quickjs_test262: false,
226- // gnu_make: 'gmake'
244+ // gnu_make: 'gmake',
245+ // gnu_make_eunit_opts: '${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
227246 // ],
228247
229248 ' macos' : [
@@ -233,7 +252,7 @@ meta = [
233252 with_clouseau : true ,
234253 clouseau_java_home : ' /opt/homebrew/opt/openjdk@21' ,
235254 gnu_make : ' gmake' ,
236- gnu_make_eunit_opts : ' -j4 --output-sync=target '
255+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS} '
237256 ],
238257
239258 ' win2022' : [
@@ -242,7 +261,8 @@ meta = [
242261 with_clouseau : true ,
243262 clouseau_java_home : / C:\t ools\z ulu21.46.19-ca-jdk21.0.9-win_x64/ ,
244263 quickjs_test262 : false ,
245- node_label : ' win'
264+ node_label : ' win' ,
265+ gnu_make_eunit_opts : ' ${DEFAULT_GNU_MAKE_EUNIT_OPTS}'
246266 ]
247267]
248268
@@ -302,7 +322,7 @@ def generateNativeStage(platform) {
302322 if ( meta[platform]. gnu_make_eunit_opts ) {
303323 eunit_opts = meta[platform]. gnu_make_eunit_opts
304324 }
305- retry (3 ) {sh ' $MAKE eunit ' + eunit_opts}
325+ retry (3 ) {sh ' $MAKE ' + eunit_opts + ' eunit ' }
306326 if (meta[platform]. quickjs_test262) {retry(3 ) {sh ' make quickjs-test262' }}
307327 retry (3 ) {sh ' $MAKE elixir' }
308328 retry (3 ) {sh ' $MAKE elixir-search ERLANG_COOKIE=crumbles' }
@@ -361,7 +381,7 @@ def generateNativeStage(platform) {
361381 ..\\ ..\\ couchdb-glazier\\ bin\\ shell.ps1
362382 Write-Output 'The following tests are skipped:'
363383 ..\\ ..\\ couchdb-glazier\\ bin\\ exclude_tests_win.ps1 -Path . | Out-Host
364- make -j 4 -f Makefile.win eunit
384+ make ${ meta[platform].gnu_make_eunit_opts } -f Makefile.win eunit
365385 """ , label : ' EUnit tests' )
366386 }
367387
@@ -469,7 +489,11 @@ def generateContainerStage(platform) {
469489 dir( " ${ platform} /build" ) {
470490 sh " ${ configure(meta[platform])} "
471491 sh ' make'
472- retry(3 ) {sh ' make eunit' }
492+ eunit_opts = ' '
493+ if ( meta[platform]. gnu_make_eunit_opts ) {
494+ eunit_opts = meta[platform]. gnu_make_eunit_opts
495+ }
496+ retry (3 ) {sh " make ${ eunit_opts} eunit" }
473497 if (meta[platform]. quickjs_test262) {retry(3 ) {sh ' make quickjs-test262' }}
474498 retry(3 ) {sh ' make elixir' }
475499 retry(3 ) {sh " ${ setClouseauJavaHome} timeout 5m make elixir-search ERLANG_COOKIE=crumbles" }
0 commit comments