From: Ian Jackson Date: Thu, 29 Oct 2015 02:09:01 +0000 (+0000) Subject: Testing: New run-all script X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=cgi-auth-flexible.git;a=commitdiff_plain;h=79e842d945d131b5ca1796663c4ed30e8f37d4ef Testing: New run-all script Signed-off-by: Ian Jackson --- diff --git a/tests/README b/tests/README index b13e658..8f63daa 100644 --- a/tests/README +++ b/tests/README @@ -1,3 +1,5 @@ +tests/run-all + tests/autotest tests/loginout.at REQUEST_METHOD=post CAFTEST_CAF=`pwd` tests/cgi ; echo diff --git a/tests/run-all b/tests/run-all new file mode 100755 index 0000000..1ae2817 --- /dev/null +++ b/tests/run-all @@ -0,0 +1,17 @@ +#!/bin/sh +set -e +make=`type gmake >/dev/null 2>&1 && echo gmake || echo make` +if [ $# = 0 ]; then + ncpus=` + perl -e 'use Sys::CPU; print Sys::CPU::cpu_count()' \ + 2>/dev/null \ + || echo 1 + ` + set -- -j$(( $ncpus * 2 )) +fi +x () { + echo >&2 "$*" + "$@" +} +x $make -C tests "$@" +echo all ok.