From a3d2264b886ef732b31cade5a4e3e3a2593b6f9b Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 13 Jul 2021 23:23:23 +0200 Subject: [PATCH] Only run an unbridled parallel make (make -j) if MAKEFLAGS is unset Signed-off-by: Gilles Peskine --- tests/scripts/basic-build-test.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/scripts/basic-build-test.sh b/tests/scripts/basic-build-test.sh index 83aa87aa08..4b05d1b2fa 100755 --- a/tests/scripts/basic-build-test.sh +++ b/tests/scripts/basic-build-test.sh @@ -62,6 +62,11 @@ fi : ${SEED:=1} export SEED +# if MAKEFLAGS is not set add the -j option to speed up invocations of make +if [ -z "${MAKEFLAGS+set}" ]; then + export MAKEFLAGS="-j" +fi + # To avoid setting OpenSSL and GnuTLS for each call to compat.sh and ssl-opt.sh # we just export the variables they require export OPENSSL_CMD="$OPENSSL" @@ -87,7 +92,7 @@ export LDFLAGS=' --coverage' make clean cp "$CONFIG_H" "$CONFIG_BAK" scripts/config.py full -make -j +make # Step 2 - Execute the tests