From 79e842d945d131b5ca1796663c4ed30e8f37d4ef Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 29 Oct 2015 02:09:01 +0000 Subject: [PATCH] Testing: New run-all script Signed-off-by: Ian Jackson --- tests/README | 2 ++ tests/run-all | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 tests/run-all 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. -- 2.30.2