Skip to content

Commit 22e8728

Browse files
committed
Stream go test logs
Go will only stream test logs if it is testing a single module at a time, otherwise it will buffer the logs to the end and then display them. This causes issues for CI as it means there's no idea what is happening at the moment and the logs will be missing if the run is cancelled. See golang/go#27826.
1 parent ce59c65 commit 22e8728

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

GNUmakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ clean:
3030
@echo "Deleting local provider binary"
3131
rm -rf $(BIN)
3232

33+
# `-p=1` added to avoid testing packages in parallel which causes `go test` to not stream logs as they are written
3334
testacc:
34-
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 360m -parallel=$(TEST_PARALLELISM)
35+
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 360m -p=1 -parallel=$(TEST_PARALLELISM)
3536

3637
install_local: build
3738
@echo "Installing local provider binary to plugins mirror path $(PLUGINS_PATH)/$(PLUGINS_PROVIDER_PATH)"

0 commit comments

Comments
 (0)