3 # convenience script for running the tests outside adt-run
4 # usage: tests/using-intree tests/run-all [-p|--progressive] [tests/tests/*]
6 # passing `:' as if it were tests/tests/something is
7 # a no-op and therefore just means to (delete and) set up the tmpdir
13 --progressive|-p) shift; export DGIT_TESTS_PROGRESSIVE=y;;
15 -*) echo >&2 "run-all: unknown option $1"; exit 20 ;;
20 ncpus=$(nproc || echo 1)
21 jcpus=-j$(( ncpus * 134 / 100 ))
23 if [ "x$DGIT_TESTS_TMPDIR" != x ]; then
26 tmpdir="${tmpdir//!/!#!}"
27 tmpdir="${tmpdir//\//!}"
28 tmpdir="$DGIT_TESTS_TMPDIR/$tmpdir"
30 ln -ns -- "$tmpdir" tests/tmp
35 case "$DGIT_TESTS_PROGRESSIVE" in
46 if [ $# = 0 ]; then exit 0; fi
54 export DGIT_GNUPG_STUNT_ERRLOG=$( tty -s ||: )
58 exec make $jcpus -k -f tests/Makefile "$@"
59 ) 2>&1 |tee tests/tmp/run-all.log