X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=bin%2Ferrs2;h=17548cbf689da6e62d875f908a5313e3d773ca60;hb=d1d2c6c54abe935ff63d58a68835049547af425b;hp=2ba4f45f1b672428937303ed49afd34eb73ab211;hpb=94ed443ad79f8b3a96e382a45cafc35f414ec5f4;p=nethome.git diff --git a/bin/errs2 b/bin/errs2 index 2ba4f45..17548cb 100755 --- a/bin/errs2 +++ b/bin/errs2 @@ -1,17 +1,32 @@ -#! /bin/sh -# $Id$ +#! /bin/bash + +renice +19 -p $$; ionice -c3 -p $$ args="" if [ "$1" = "-a" ];then args="$args $1" shift fi +out=errs2 +if [ "$1" = "-n" ];then + out="$2" + shift 2 +fi j="" cpus="`getconf _NPROCESSORS_ONLN`" if [ -n "$cpus" ];then j="-j$[$cpus*3/2]" fi +rm -f $out.ok ( set -ex time nice make $j "$@" - ) 2>&1|tee $args errs2 + if [ -d gdb/testsuite ];then + make -C gdb/testsuite site.exp + fi + touch $out.ok + ) 2>&1|tee $args $out +test -f $out.ok +rc=$? +rm -f $out.ok +exit $rc