Skip to content

Commit

Permalink
tees test output to a gitignored file
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Kimmel <[email protected]>
  • Loading branch information
joe-kimmel-vmw authored and dfreilich committed Jan 8, 2023
1 parent c72928d commit dda3f38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ To run unit and integration tests:
```shell
make unit
```
Test output will be streamed to your terminal and also saved to the file
out/unit

To run acceptance tests:
```shell
make acceptance
```
Test output will be streamed to your terminal and also saved to the file
out/acceptance

Alternately, to run all tests:
```shell
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@ unit: GOTESTFLAGS:=$(GOTESTFLAGS) --tags=example
endif
unit: out
@echo "> Running unit/integration tests..."
$(GOCMD) test $(GOTESTFLAGS) -timeout=$(UNIT_TIMEOUT) ./...
$(GOCMD) test $(GOTESTFLAGS) -timeout=$(UNIT_TIMEOUT) ./... | tee out/unit

acceptance: out
@echo "> Running acceptance tests..."
$(GOCMD) test $(GOTESTFLAGS) -timeout=$(ACCEPTANCE_TIMEOUT) -tags=acceptance ./acceptance
$(GOCMD) test $(GOTESTFLAGS) -timeout=$(ACCEPTANCE_TIMEOUT) -tags=acceptance ./acceptance | tee out/acceptance

acceptance-all: export ACCEPTANCE_SUITE_CONFIG:=$(shell $(CAT) .$/acceptance$/testconfig$/all.json)
acceptance-all:
@echo "> Running acceptance tests..."
$(GOCMD) test $(GOTESTFLAGS) -timeout=$(ACCEPTANCE_TIMEOUT) -tags=acceptance ./acceptance
$(GOCMD) test $(GOTESTFLAGS) -timeout=$(ACCEPTANCE_TIMEOUT) -tags=acceptance ./acceptance | tee out/acceptance

clean:
@echo "> Cleaning workspace..."
Expand Down

0 comments on commit dda3f38

Please sign in to comment.