Skip to content

Commit

Permalink
Set --parallel to match --cpu flag
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
AwesomePatrol committed Jan 3, 2025
1 parent fa889cc commit cfc4e15
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ fi
COMMON_TEST_FLAGS=("${RACE}")
if [[ -n "${CPU:-}" ]]; then
COMMON_TEST_FLAGS+=("--cpu=${CPU}")
COMMON_TEST_FLAGS+=("--parallel=${CPU}")
fi

log_callout "Running with ${COMMON_TEST_FLAGS[*]}"
Expand Down

0 comments on commit cfc4e15

Please sign in to comment.