Skip to content

Commit

Permalink
Merge pull request #1746 from joejstuart/more-mac-fixes
Browse files Browse the repository at this point in the history
Group all commands when running make acceptance
  • Loading branch information
joejstuart authored Jul 8, 2024
2 parents da74467 + b995269 commit 560f369
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,21 @@ ACCEPTANCE_TIMEOUT:=20m
.ONESHELL:
.SHELLFLAGS=-e -c
.PHONY: acceptance

acceptance: ## Run all acceptance tests
@ACCEPTANCE_WORKDIR="$$(mktemp -d)"
@function cleanup() {
cp "$${ACCEPTANCE_WORKDIR}"/features/__snapshots__/* "$(ROOT_DIR)"/features/__snapshots__/
#rm -rf "$${ACCEPTANCE_WORKDIR}"
}
@trap cleanup EXIT
@cp -R . "$${ACCEPTANCE_WORKDIR}"
@cd "$${ACCEPTANCE_WORKDIR}"
@go run acceptance/coverage/coverage.go
@$(MAKE) build
@export COVERAGE_FILEPATH="$${ACCEPTANCE_WORKDIR}"
@export COVERAGE_FILENAME="-acceptance"
@cd acceptance && go test -timeout $(ACCEPTANCE_TIMEOUT) ./...
@go run -modfile "$${ACCEPTANCE_WORKDIR}/tools/go.mod" github.com/wadey/gocovmerge "$${ACCEPTANCE_WORKDIR}"/coverage-acceptance*.out > "$(ROOT_DIR)/coverage-acceptance.out"
@ACCEPTANCE_WORKDIR="$$(mktemp -d)"; \
cleanup() { \
cp "$${ACCEPTANCE_WORKDIR}"/features/__snapshots__/* "$(ROOT_DIR)"/features/__snapshots__/; \
}; \
trap cleanup EXIT; \
cp -R . "$$ACCEPTANCE_WORKDIR"; \
cd "$$ACCEPTANCE_WORKDIR" && \
go run acceptance/coverage/coverage.go && \
$(MAKE) build && \
export COVERAGE_FILEPATH="$$ACCEPTANCE_WORKDIR"; \
export COVERAGE_FILENAME="-acceptance"; \
cd acceptance && go test -coverprofile "$$ACCEPTANCE_WORKDIR/coverage-acceptance.out" -timeout $(ACCEPTANCE_TIMEOUT) ./... && \
go run -modfile "$$ACCEPTANCE_WORKDIR/tools/go.mod" github.com/wadey/gocovmerge "$$ACCEPTANCE_WORKDIR/coverage-acceptance.out" > "$(ROOT_DIR)/coverage-acceptance.out"

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

0 comments on commit 560f369

Please sign in to comment.