From: Amos Jeffries Date: Mon, 23 Feb 2009 11:05:52 +0000 (+1300) Subject: Author: frencesco chemolli X-Git-Tag: SQUID_3_2_0_1~1166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6901eda8baeecfc63a5338a1724ae7d962209b60;p=thirdparty%2Fsquid.git Author: frencesco chemolli testBed: add parallel make capability to build testing This small patch to the test-suite system allows for parallel-make in the test-suite (only on Linux). This will allow for shorter build-test times on multicpu/multicore systems. --- 6901eda8baeecfc63a5338a1724ae7d962209b60 diff --cc test-suite/buildtest.sh index 395d496683,9316254b65..ed76be6a28 --- a/test-suite/buildtest.sh +++ b/test-suite/buildtest.sh @@@ -7,11 -7,24 +7,19 @@@ # dist="${1}" - -# Figure out where to log the test output -log=`echo "${dist}" | sed s/..test-suite.buildtests.//g ` +base="`dirname $0`" + #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... -{ - if test -e ${dist%%.opts}.opts ; then echo "BUILD: ${dist%%.opts}.opts" - . ./${dist%%.opts}.opts + . ${dist%%.opts}.opts else echo "BUILD: DEFAULT" OPTS="" @@@ -30,9 -44,10 +38,9 @@@ f # above command currently encounters dependancy problems on cleanup. # rm -f -r src/fs/aufs/.deps src/fs/diskd/.deps && - ../configure --silent ${OPTS} 2>&1 && - make $pjobs check 2>&1 && - make $pjobs 2>&1 - -} 2>&1 > ./buildtest_${log}.log + $base/../configure --silent ${OPTS} 2>&1 && - make check 2>&1 && - make distcheck 2>&1 && - make 2>&1 ++ make ${pjobs} check 2>&1 && ++ make ${pjobs} distcheck 2>&1 && ++ make ${pjobs} 2>&1 # do not build any of the install's ...