From a8c935eab07ab3e7be358f1cf59bfcda7889e943 Mon Sep 17 00:00:00 2001 From: Piotr Tabor Date: Thu, 28 Jan 2021 19:15:04 +0000 Subject: [PATCH] test.sh: Stop requiring/defaulting CPU flag to 4 --- test.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test.sh b/test.sh index 29a6cf181..d71be564f 100755 --- a/test.sh +++ b/test.sh @@ -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=()