Skip to content

Commit cfc4e15

Browse files
committed
Set --parallel to match --cpu flag
Otherwise `go test` would execute GOMAXPROCS parallel tests running `--cpu` number of processes (1,2,4) which could starve cpu in some cases. Signed-off-by: Aleksander Mistewicz <[email protected]>
1 parent fa889cc commit cfc4e15

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ fi
8282
COMMON_TEST_FLAGS=("${RACE}")
8383
if [[ -n "${CPU:-}" ]]; then
8484
COMMON_TEST_FLAGS+=("--cpu=${CPU}")
85+
COMMON_TEST_FLAGS+=("--parallel=${CPU}")
8586
fi
8687

8788
log_callout "Running with ${COMMON_TEST_FLAGS[*]}"

0 commit comments

Comments
 (0)