Files
taskwarrior-2.x/src/tests/run_all
Paul Beckingham 9f9c19d4ae Unit Tests - fix
- The unit tests for color were still linking against color.o, instead
  of the new Color.o.  Subtle, but wrong.
2009-10-11 16:17:26 -04:00

35 lines
566 B
Bash
Executable File

#! /bin/bash
date > all.log
for i in *.t
do
./$i >> all.log 2>&1
done
date >> all.log
START=`head -1 all.log`
END=`tail -1 all.log`
OS=`uname`
case $OS in
Darwin)
STARTEPOCH=`date -j -f "%a %b %d %T %Z %Y" "${START}" "+%s"`
ENDEPOCH=`date -j -f "%a %b %d %T %Z %Y" "${END}" "+%s"`
;;
Linux)
STARTEPOCH=`date "+%s" -d "${START}"`
ENDEPOCH=`date "+%s" -d "${END}"`
;;
esac
RUNTIME=$(($ENDEPOCH - $STARTEPOCH))
echo -n 'Pass: '
grep ^ok all.log | wc -l
echo -n 'Fail: '
grep ^not all.log | wc -l
echo -n 'Runtime: '
echo $RUNTIME