Skip to content

Commit 560f369

Browse files
authored
Merge pull request #1746 from joejstuart/more-mac-fixes
Group all commands when running make acceptance
2 parents da74467 + b995269 commit 560f369

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

Makefile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,21 @@ ACCEPTANCE_TIMEOUT:=20m
100100
.ONESHELL:
101101
.SHELLFLAGS=-e -c
102102
.PHONY: acceptance
103+
103104
acceptance: ## Run all acceptance tests
104-
@ACCEPTANCE_WORKDIR="$$(mktemp -d)"
105-
@function cleanup() {
106-
cp "$${ACCEPTANCE_WORKDIR}"/features/__snapshots__/* "$(ROOT_DIR)"/features/__snapshots__/
107-
#rm -rf "$${ACCEPTANCE_WORKDIR}"
108-
}
109-
@trap cleanup EXIT
110-
@cp -R . "$${ACCEPTANCE_WORKDIR}"
111-
@cd "$${ACCEPTANCE_WORKDIR}"
112-
@go run acceptance/coverage/coverage.go
113-
@$(MAKE) build
114-
@export COVERAGE_FILEPATH="$${ACCEPTANCE_WORKDIR}"
115-
@export COVERAGE_FILENAME="-acceptance"
116-
@cd acceptance && go test -timeout $(ACCEPTANCE_TIMEOUT) ./...
117-
@go run -modfile "$${ACCEPTANCE_WORKDIR}/tools/go.mod" github.com/wadey/gocovmerge "$${ACCEPTANCE_WORKDIR}"/coverage-acceptance*.out > "$(ROOT_DIR)/coverage-acceptance.out"
105+
@ACCEPTANCE_WORKDIR="$$(mktemp -d)"; \
106+
cleanup() { \
107+
cp "$${ACCEPTANCE_WORKDIR}"/features/__snapshots__/* "$(ROOT_DIR)"/features/__snapshots__/; \
108+
}; \
109+
trap cleanup EXIT; \
110+
cp -R . "$$ACCEPTANCE_WORKDIR"; \
111+
cd "$$ACCEPTANCE_WORKDIR" && \
112+
go run acceptance/coverage/coverage.go && \
113+
$(MAKE) build && \
114+
export COVERAGE_FILEPATH="$$ACCEPTANCE_WORKDIR"; \
115+
export COVERAGE_FILENAME="-acceptance"; \
116+
cd acceptance && go test -coverprofile "$$ACCEPTANCE_WORKDIR/coverage-acceptance.out" -timeout $(ACCEPTANCE_TIMEOUT) ./... && \
117+
go run -modfile "$$ACCEPTANCE_WORKDIR/tools/go.mod" github.com/wadey/gocovmerge "$$ACCEPTANCE_WORKDIR/coverage-acceptance.out" > "$(ROOT_DIR)/coverage-acceptance.out"
118118

119119
# Add @focus above the feature you're hacking on to use this
120120
# (Mainly for use with the feature-% target below)

0 commit comments

Comments
 (0)