X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Frun-all;h=f72b9fae7d0958d490213027070c2736da87bc98;hp=e2e2a6f517f51b5ae99df2e663a0afca90aaba13;hb=9f89aa601dc0ca0ea4387ce3cd9e1304770577e3;hpb=c0d3371a902372662e911a1df080f0ffa17b6b72 diff --git a/tests/run-all b/tests/run-all index e2e2a6f5..f72b9fae 100755 --- a/tests/run-all +++ b/tests/run-all @@ -1,13 +1,22 @@ -#!/bin/sh +#!/bin/bash set -e # convenience script for running the tests outside adt-run -if [ $# = 0 ]; then - set `run-parts --list tests/tests` +# usage: tests/using-intree tests/run-all + +set -o pipefail + +ncpus=$(nproc || echo 1) +jcpus=-j$(( ncpus * 134 / 100 )) + +if [ $# != 0 ]; then + set TESTSCRIPTS="$*" fi -for f in $@; do - echo ================================================== - echo $f - $f - echo ================================================== -done -echo "ALL PASSED" + +mkdir -p tests/tmp + +export DGIT_GNUPG_STUNT_ERRLOG=$( tty -s ||: ) + +( + set -x + exec make $jcpus -k -f tests/Makefile "$@" +) 2>&1 |tee tests/tmp/run-all.log