added shunit support in variables, made shunit provide run time for whole
[feisty_meow.git] / scripts / shunit / shunit2
old mode 100644 (file)
new mode 100755 (executable)
index a56ed4a..71a3d8c
@@ -862,6 +862,7 @@ _shunit_generateReport()
     _shunit_msg_="${_shunit_msg_})"
   fi
 
+  echo "Suite ran for $(($suite_end - $suite_start)) seconds."
   echo
   echo "$(date): ${_shunit_msg_}"
   __shunit_reportGenerated=${SHUNIT_TRUE}
@@ -1041,6 +1042,9 @@ if [ "${__shunit_mode}" = "${__SHUNIT_MODE_STANDALONE}" ]; then
   . "`_shunit_prepForSourcing \"${__shunit_script}\"`"
 fi
 
+# record when the tests started running.
+suite_start=$(date +%s)
+
 # execute the oneTimeSetUp function (if it exists)
 oneTimeSetUp
 
@@ -1063,6 +1067,8 @@ _shunit_execSuite
 # execute the oneTimeTearDown function (if it exists)
 oneTimeTearDown
 
+suite_end=$(date +%s)
+
 # generate the report
 _shunit_generateReport