From 8bb0732cc64276068167adcde45339197b25aef1 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Wed, 20 Jul 2022 19:20:27 +0200 Subject: [PATCH] Build system: add single-threaded compile mode to test script --- scripts/test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/test.sh b/scripts/test.sh index 77a57b1..936c434 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -15,6 +15,13 @@ # version 3 along with this program. # If not, see https://www.gnu.org/licenses/agpl-3.0.en.html +if [ "$(tr '[:upper:]' '[:lower:]' <<< $SINGLE)" = "yes" ]; then + echo "Building tests in single-threaded mode." + WAIT_ANYWAY="wait" +else + WAIT_ANYWAY="" +fi + if [ -z "$CXX" ]; then CXX="c++" fi @@ -44,6 +51,7 @@ COMPILE_COMMANDS=( for command in ${!COMPILE_COMMANDS[@]}; do echo "${COMPILE_COMMANDS[command]}" ${COMPILE_COMMANDS[command]} & + $WAIT_ANYWAY done wait