test.sh: Stop requiring/defaulting CPU flag to 4

This commit is contained in:
Piotr Tabor 2021-01-28 19:15:04 +00:00
parent a4fac14353
commit a8c935eab0

View File

@ -54,9 +54,6 @@ if [ -z "$GOARCH" ]; then
GOARCH=$(go env GOARCH);
fi
# determine the number of CPUs to use for Go tests
CPU=${CPU:-"4"}
# determine whether target supports race detection
if [ -z "${RACE}" ] ; then
if [ "$GOARCH" == "amd64" ]; then
@ -69,7 +66,11 @@ else
fi
# This options make sense for cases where SUT (System Under Test) is compiled by test.
COMMON_TEST_FLAGS=("-cpu=${CPU}" "${RACE}")
COMMON_TEST_FLAGS=("${RACE}")
if [[ ! -z "${CPU}" ]]; then
COMMON_TEST_FLAGS+=(--cpu ${CPU})
fi
log_callout "Running with ${COMMON_TEST_FLAGS[*]}"
RUN_ARG=()