projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed fortune.
[feisty_meow.git]
/
scripts
/
shunit
/
shunit2
diff --git
a/scripts/shunit/shunit2
b/scripts/shunit/shunit2
index c8144896c4552dd26834916921a54ce687a4f0b0..e9afb3d5cb1bb919c1236484da4fc38da33db8f5 100755
(executable)
--- a/
scripts/shunit/shunit2
+++ b/
scripts/shunit/shunit2
@@
-862,12
+862,21
@@
_shunit_generateReport()
_shunit_msg_="${_shunit_msg_})"
fi
_shunit_msg_="${_shunit_msg_})"
fi
+ if [ -z "$suite_end" ]; then
+ # make sure we don't get confused, since suite aborted early.
+ suite_end=$(date +%s)
+ fi
+ # we keep duration_s for later printing.
duration_s=$(($suite_end - $suite_start))
duration_s=$(($suite_end - $suite_start))
+ # calculate full minutes count based on seconds.
duration_m=$(($duration_s / 60))
duration_m=$(($duration_s / 60))
+ # calculate how many hours that is.
duration_h=$(($duration_m / 60))
duration_h=$(($duration_m / 60))
+ # fix the minutes since we chopped those hours out.
+ duration_m=$(($duration_m - $duration_h * 60))
if [ $duration_m -lt 10 ]; then duration_m="0$duration_m"; fi
if [ $duration_h -lt 10 ]; then duration_h="0$duration_h"; fi
if [ $duration_m -lt 10 ]; then duration_m="0$duration_m"; fi
if [ $duration_h -lt 10 ]; then duration_h="0$duration_h"; fi
- echo "
S
uite ran for $duration_s total seconds [$duration_h:$duration_m hh:mm]"
+ echo "
Test s
uite ran for $duration_s total seconds [$duration_h:$duration_m hh:mm]"
echo
echo "$(date): ${_shunit_msg_}"
__shunit_reportGenerated=${SHUNIT_TRUE}
echo
echo "$(date): ${_shunit_msg_}"
__shunit_reportGenerated=${SHUNIT_TRUE}