From c5de9df963deaa4485e72fe25c2e3efd6ed29ff6 Mon Sep 17 00:00:00 2001 From: Owen Clarke Date: Wed, 22 Aug 2012 20:34:01 +1000 Subject: [PATCH] Portability - Changed bash-style syntax to sh syntax - Reverted date printing to using perl as per 0cb71a8 for support on Solaris --- test/run_all | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/run_all b/test/run_all index 84fb3994e..b924518d0 100755 --- a/test/run_all +++ b/test/run_all @@ -1,22 +1,22 @@ #! /bin/sh date > all.log -STARTEPOCH=`date +%s` +STARTEPOCH=`perl -e 'print time'` -VRAMSTEG=/usr/local/bin/vramsteg +VRAMSTEG=`which vramsteg` BAR=0 -if [ -x $VRAMSTEG ]; then +if [ -x "$VRAMSTEG" ]; then BAR=1 COUNT=0 - TOTAL=$(ls *.t | wc -l) - START=$($VRAMSTEG --now) + TOTAL=`ls *.t | wc -l` + START=`$VRAMSTEG --now` fi for i in *.t *.t.exe do echo '#' $i >>all.log - if [ $BAR == 1 ]; then + if [ $BAR -eq 1 ]; then $VRAMSTEG --label 'All tests' --min 0 --max $TOTAL --current $COUNT --percentage --start $START --estimate COUNT=`expr $COUNT + 1` fi @@ -24,16 +24,16 @@ do ./$i >> all.log 2>&1 done -if [ $BAR == 1 ]; then +if [ $BAR -eq 1 ]; then $VRAMSTEG --remove fi date >> all.log -ENDEPOCH=`date +%s` +ENDEPOCH=`perl -e 'print time'` RUNTIME=`expr $ENDEPOCH - $STARTEPOCH` -printf "Pass: %5d\n" $(grep -c ^ok all.log) -printf "Fail: %5d\n" $(grep -c ^not all.log) -printf "Skipped: %5d\n" $(grep -c ^skip all.log) +printf "Pass: %5d\n" `grep -c '^ok' all.log` +printf "Fail: %5d\n" `grep -c '^not' all.log` +printf "Skipped: %5d\n" `grep -c '^skip' all.log` printf "Runtime: %5d seconds\n" $RUNTIME