X-Git-Url: http://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=bin%2Ferrs2;h=2a52832b6ec3702fffa3de9fde3561dfe2e7b2a7;hp=7563cf7492bb30d60bf7630ff50823b52964d3fe;hb=f15d3d19ea40312737e009b52e7359f57c123f8f;hpb=64a3cb99fc3a3d6334fa2fef5d97bfed6d1034ed diff --git a/bin/errs2 b/bin/errs2 index 7563cf7..2a52832 100755 --- a/bin/errs2 +++ b/bin/errs2 @@ -1,17 +1,33 @@ #! /bin/sh # $Id$ +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+1]" + 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