Skip to content

Commit 386a355

Browse files
gounthardduportal
andauthored
chore: Use the Junit output format of bats (#2023)
* chore: Use the Junit output format of bats Avoids requiring an npm package to convert from TAP format to Junit format (ref #2022). * debug(linux tests) introduce artificial failure to validate junit output from `bats` * Revert "debug(linux tests) introduce artificial failure to validate junit output from `bats`" This reverts commit 7b11b0bd7c6770d2b6de1d6ea65a14d68c42d308. --------- Co-authored-by: Damien Duportal <[email protected]>
1 parent 4a328fc commit 386a355

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,7 @@ test-%: prepare-test
100100
# Ensure that the image is built
101101
@make --silent build-$*
102102
# Execute the test harness and write result to a TAP file
103-
IMAGE=$* bats/bin/bats $(bats_flags) | tee target/results-$*.tap
104-
# convert TAP to JUNIT
105-
docker run --rm -v "$(CURDIR)":/usr/src/app -w /usr/src/app node:22-alpine \
106-
sh -c "npm install -g npm@latest && npm install tap-xunit -g && cat target/results-$*.tap | tap-xunit --package='jenkinsci.docker.$*' > target/junit-results-$*.xml"
103+
IMAGE=$* bats/bin/bats $(bats_flags) --formatter junit | tee target/junit-results-$*.xml
107104

108105
test: prepare-test
109106
@make --silent list | while read image; do make --silent "test-$${image}"; done

0 commit comments

Comments
 (0)