From: Francesco Chemolli Date: Thu, 19 Feb 2009 08:56:47 +0000 (+0100) Subject: Added buildtest parallelization (only available on Linux) X-Git-Tag: SQUID_3_2_0_1~1166^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16c198dbd22ff896011de2763994aa7acf0cd827;p=thirdparty%2Fsquid.git Added buildtest parallelization (only available on Linux) --- diff --git a/test-suite/buildtest.sh b/test-suite/buildtest.sh index 87561671a8..9316254b65 100755 --- a/test-suite/buildtest.sh +++ b/test-suite/buildtest.sh @@ -11,6 +11,14 @@ dist="${1}" # Figure out where to log the test output log=`echo "${dist}" | sed s/..test-suite.buildtests.//g ` +#if we are on Linux, let's try parallelizing +pjobs="" #default +if [ -e /proc/cpuinfo ]; then + ncpus=`grep '^processor' /proc/cpuinfo | tail -1|awk '{print $3}'` + ncpus=`expr $ncpus + 1` + pjobs="-j$ncpus" +fi + # ... and send everything there... { @@ -37,8 +45,8 @@ fi # rm -f -r src/fs/aufs/.deps src/fs/diskd/.deps && ../configure --silent ${OPTS} 2>&1 && - make check 2>&1 && - make 2>&1 + make $pjobs check 2>&1 && + make $pjobs 2>&1 } 2>&1 > ./buildtest_${log}.log