]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Determine number of parallel make jobs automatically
authorJouni Malinen <j@w1.fi>
Fri, 4 Dec 2020 09:49:04 +0000 (11:49 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 4 Dec 2020 09:49:04 +0000 (11:49 +0200)
Use nproc (if available) instead of the hardcoded 8 parallel make jobs.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/build.sh

index 2a3dd706ebf97fecd6d579d0c8f4a9f58124d52c..cb4700166f8231e311af85f994f5dad159637fb5 100755 (executable)
@@ -26,13 +26,18 @@ while [ "$1" != "" ]; do
        esac
 done
 
+JOBS=`nproc`
+if [ -z "$ABC" ]; then
+    JOBS=8
+fi
+
 echo "Building TNC testing tools"
 cd tnc
-make QUIET=1 -j8
+make QUIET=1 -j$JOBS
 
 echo "Building wlantest"
 cd ../../../wlantest
-make QUIET=1 -j8 > /dev/null
+make QUIET=1 -j$JOBS > /dev/null
 
 echo "Building hs20-osu-client"
 cd ../hs20/client/
@@ -54,7 +59,7 @@ if [ $use_lcov -eq 1 ]; then
     fi
 fi
 
-make QUIET=1 -j8 hostapd hostapd_cli hlr_auc_gw
+make QUIET=1 -j$JOBS hostapd hostapd_cli hlr_auc_gw
 
 echo "Building wpa_supplicant"
 cd ../wpa_supplicant
@@ -75,4 +80,4 @@ fi
 if [ -z $FIPSLD_CC ]; then
 export FIPSLD_CC=gcc
 fi
-make QUIET=1 -j8
+make QUIET=1 -j$JOBS