Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Use -cpu arg instead of GOMAXPROCS
Browse files Browse the repository at this point in the history
  • Loading branch information
cheungpat committed Oct 25, 2016
1 parent 35769cd commit 4d40f4b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DOCKER_RUN := docker run --rm -i \
-v `pwd`:/go/src/github.com/skygeario/skygear-server \
-w /go/src/github.com/skygeario/skygear-server \
skygeario/skygear-godev:latest
DOCKER_COMPOSE_RUN := ${DOCKER_COMPOSE_CMD} run --rm -e GOMAXPROCS app
DOCKER_COMPOSE_RUN := ${DOCKER_COMPOSE_CMD} run --rm app
DOCKER_COMPOSE_RUN_DB := ${DOCKER_COMPOSE_CMD} run --rm db_cmd
GO_TEST_TIMEOUT := 5m
endif
Expand Down Expand Up @@ -48,8 +48,7 @@ before-test:
test:
# Run `go install` to compile packages to speed up test process
$(DOCKER_COMPOSE_RUN) go install $(GO_BUILD_ARGS)
GOMAXPROCS=1 $(DOCKER_COMPOSE_RUN) go test $(GO_BUILD_ARGS) -cover -timeout $(GO_TEST_TIMEOUT) ./pkg/...
GOMAXPROCS=4 $(DOCKER_COMPOSE_RUN) go test $(GO_BUILD_ARGS) -cover -timeout $(GO_TEST_TIMEOUT) ./pkg/...
$(DOCKER_COMPOSE_RUN) go test $(GO_BUILD_ARGS) -cover -timeout $(GO_TEST_TIMEOUT) -cpu 1,4 ./pkg/...

.PHONY: after-docker-test
after-docker-test:
Expand Down

0 comments on commit 4d40f4b

Please sign in to comment.