Skip to content

Commit

Permalink
Prow postsubmit runs unit tests sequentially (istio#4242)
Browse files Browse the repository at this point in the history
* Postsubmit runs unit tests sequentially

* set -parallel 1

* revert presubmit unit tests
  • Loading branch information
chxchx authored Mar 14, 2018
1 parent e15c390 commit bcdfa2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ istioctl-install:
# Target: test
#-----------------------------------------------------------------------------

.PHONY: junit-parser test localTestEnv test-bins
.PHONY: test localTestEnv test-bins

JUNIT_REPORT := $(shell which go-junit-report 2> /dev/null || echo "${ISTIO_BIN}/go-junit-report")

Expand Down Expand Up @@ -434,13 +434,15 @@ localTestEnv: test-bins
# Temp. disable parallel test - flaky consul test.
# https://github.com/istio/istio/issues/2318
.PHONY: pilot-test
PILOT_TEST_T ?= ${GOTEST_P} ${T}
pilot-test: pilot-agent
go test ${GOTEST_P} ${T} ./pilot/...
go test ${PILOT_TEST_T} ./pilot/...

.PHONY: mixer-test
MIXER_TEST_T ?= ${T} ${GOTEST_PARALLEL}
mixer-test: mixs
# Some tests use relative path "testdata", must be run from mixer dir
(cd mixer; go test ${T} ${GOTEST_PARALLEL} ./...)
(cd mixer; go test ${MIXER_TEST_T} ./...)

.PHONY: broker-test
broker-test: depend
Expand Down
5 changes: 4 additions & 1 deletion prow/istio-postsubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ cd $ROOT
make init

echo 'Running Unit Tests'
GOTEST_FLAG="-p 1 -parallel 1 -v"
time JUNIT_UNIT_TEST_XML="${ARTIFACTS_DIR}/junit_unit-tests.xml" \
T="-v" \
T="${GOTEST_FLAG}" \
PILOT_TEST_T="${GOTEST_FLAG}" \
MIXER_TEST_T="${GOTEST_FLAG}" \
make localTestEnv test

HUB="gcr.io/istio-testing"
Expand Down

0 comments on commit bcdfa2b

Please sign in to comment.