taskwarrior/test/run_all
Owen Clarke 049f34d339 Portability
- Improved run_all script to run on Solaris.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-25 23:10:11 -05:00

39 lines
774 B
Bash
Executable file

#! /bin/bash
date > all.log
STARTEPOCH=`perl -e 'print time'`
VRAMSTEG=/usr/local/bin/vramsteg
BAR=0
if [ -x $VRAMSTEG ]; then
BAR=1
COUNT=0
TOTAL=$(ls *.t | wc -l)
START=$($VRAMSTEG --now)
fi
for i in *.t
do
echo '#' $i >>all.log
if [ $BAR == 1 ]; then
$VRAMSTEG --label 'All tests' --min 0 --max $TOTAL --current $COUNT --percentage --start $START --estimate
COUNT=$[COUNT + 1]
fi
./$i >> all.log 2>&1
done
if [ $BAR == 1 ]; then
$VRAMSTEG --remove
fi
date >> all.log
ENDEPOCH=`perl -e 'print time'`
RUNTIME=$(($ENDEPOCH - $STARTEPOCH))
printf "Pass: %5d\n" $(grep ^ok all.log | wc -l)
printf "Fail: %5d\n" $(grep ^not all.log | wc -l)
printf "Skipped: %5d\n" $(grep ^skip all.log | wc -l)
printf "Runtime: %5d seconds\n" $RUNTIME