diff --git a/Makefile b/Makefile index 5e1d4ff4..6bcf9d83 100644 --- a/Makefile +++ b/Makefile @@ -96,9 +96,13 @@ test-%: prepare-test @$(call check_image,$*) # Ensure that the image is built @make --silent build-$* +ifeq ($(CI), true) # Execute the test harness and write result to a TAP file - set -x - IMAGE=$* bats/bin/bats --formatter junit $(bats_flags) | tee target/junit-results-$*.xml + IMAGE=$* bats/bin/bats $(bats_flags) --formatter junit | tee target/junit-results-$*.xml +else +# Execute the test harness + IMAGE=$* bats/bin/bats $(bats_flags) +endif test: prepare-test @make --silent list | while read image; do make --silent "test-$${image}"; done