mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 09:53:08 +02:00
Portability
- Improved run_all script to run on Solaris. Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
parent
a9de8a6596
commit
049f34d339
1 changed files with 3 additions and 16 deletions
19
test/run_all
19
test/run_all
|
@ -1,6 +1,7 @@
|
|||
#! /bin/bash
|
||||
|
||||
date > all.log
|
||||
STARTEPOCH=`perl -e 'print time'`
|
||||
|
||||
VRAMSTEG=/usr/local/bin/vramsteg
|
||||
BAR=0
|
||||
|
@ -28,25 +29,11 @@ if [ $BAR == 1 ]; then
|
|||
fi
|
||||
|
||||
date >> all.log
|
||||
|
||||
START=`head -1 all.log`
|
||||
END=`tail -1 all.log`
|
||||
OS=`uname`
|
||||
|
||||
case $OS in
|
||||
Darwin | FreeBSD)
|
||||
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
|
||||
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\n" $RUNTIME
|
||||
printf "Runtime: %5d seconds\n" $RUNTIME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue