runtest-gdbserver-read1: Fix to really run in gdbserver mode.
[nethome.git] / bin / errs2
1 #! /bin/sh
2 # $Id$
3
4 renice +19 -p $$; ionice -c3 -p $$
5
6 args=""
7 if [ "$1" = "-a" ];then
8         args="$args $1"
9         shift
10 fi
11 out=errs2
12 if [ "$1" = "-n" ];then
13         out="$2"
14         shift 2
15 fi
16 j=""
17 cpus="`getconf _NPROCESSORS_ONLN`"
18 if [ -n "$cpus" ];then
19         j="-j$[$cpus*3/2]"
20 fi
21 rm -f $out.ok
22 (
23         set -ex
24         time nice make $j "$@"
25         if [ -d gdb/testsuite ];then
26                 make -C gdb/testsuite site.exp
27         fi
28         touch $out.ok
29         ) 2>&1|tee $args $out
30 test -f $out.ok
31 rc=$?
32 rm -f $out.ok
33 exit $rc