Additional refinements of auto-bench stuff.
authorNathan Scott <nathans@sgi.com>
Fri, 20 Sep 2002 01:35:55 +0000 (01:35 +0000)
committerNathan Scott <nathans@sgi.com>
Fri, 20 Sep 2002 01:35:55 +0000 (01:35 +0000)
Fix up producing the results files.

bench
tools/auto-qa

diff --git a/bench b/bench
index 252600ed5673d1d39edb92ccafdab0a04d309412..5c066c7453c048798a33774dcd6b78afa73f7a2f 100755 (executable)
--- a/bench
+++ b/bench
@@ -110,12 +110,15 @@ _run_benchmark()
                             || _fail "            !!! couldn't chown benchdir"
 
         cd $SCRATCH_MNT/bench
                             || _fail "            !!! couldn't chown benchdir"
 
         cd $SCRATCH_MNT/bench
-        seq=`perl -e 'printf "results.%s.%03d\n", '$bench, $pass`
+        seq=`perl -e 'printf "results.%s.%03d\n", '$bench', '$pass`
+        rm -f $seq $tmp.out
+
+        _log "        *** bench [$seq]"
+        $here/src/runas -u $uid -g $gid $here/run.$bench > $tmp.out
+       [ $? -eq 0 ]        || _fail "            !!! $bench pass $pass failed"
 
 
-        _log "        *** bench [src/runas -u $uid -g $gid run.$bench]"
-        $here/src/runas -u $uid -g $gid $here/run.$bench \
-                            | _fix_malloc | tee $seq | _logp
         cd $here
         cd $here
+        _fix_malloc < $tmp.out | tee $seq | _logp
 
         _log "        *** unmounting scratch device"
         umount $SCRATCH_DEV 2>&1 | _logp \
 
         _log "        *** unmounting scratch device"
         umount $SCRATCH_DEV 2>&1 | _logp \
@@ -159,8 +162,8 @@ for bench in $benches
 do 
     echo "" >$FULL
     echo "" >$LOG
 do 
     echo "" >$FULL
     echo "" >$LOG
-    _log "*** benchmark started (passes=$passes, benchmark=$bench)"
-    _log "***     (`date`)"
+    _log "*** benchmark started [passes=$passes, benchmark=$bench]"
+    _log "*** (`date`)"
     _log "        *** unmounting scratch device"
     umount $SCRATCH_DEV 2>&1 | _fix_malloc >>$FULL
 
     _log "        *** unmounting scratch device"
     umount $SCRATCH_DEV 2>&1 | _fix_malloc >>$FULL
 
index 487660b6376422cb87a59abe4ba83e33fb9c150a..aec89afbb5dbe844b77a221a149bf45ffae9d679 100755 (executable)
@@ -492,7 +492,7 @@ do
 
            _log ""
            _log "          *** send results mail"
 
            _log ""
            _log "          *** send results mail"
-           mail -s "XFS QA benchmark results" $EMAIL < $ROOT/bench.out 2>&1
+           mail -s "XFS QA benchmark results" $EMAIL < $QADIR/bench.out 2>&1
        
            new_state="done"
            ;;
        
            new_state="done"
            ;;