diff --git a/dev/CliTestReporter.php b/dev/CliTestReporter.php index e947a7034..30f8f7690 100644 --- a/dev/CliTestReporter.php +++ b/dev/CliTestReporter.php @@ -34,9 +34,6 @@ class CliTestReporter extends SapphireTestReporter { if(function_exists('memory_get_peak_usage')) { echo "Maximum memory usage: " . number_format(memory_get_peak_usage()/(1024*1024), 1) . "M\n\n"; } - - $totalTime = array_sum($this->testSpeeds); - echo "Total time: " . round($totalTime,3) . " seconds\n"; // Use sake dev/tests/all --showslow to show slow tests if((isset($_GET['args']) && is_array($_GET['args']) && in_array('--showslow', $_GET['args'])) || isset($_GET['showslow'])) { diff --git a/dev/TestRunner.php b/dev/TestRunner.php index 98ae3ad0a..075a874a3 100644 --- a/dev/TestRunner.php +++ b/dev/TestRunner.php @@ -172,6 +172,8 @@ class TestRunner extends Controller { * @param boolean $coverage */ function runTests($classList, $coverage = false) { + $startTime = microtime(true); + // XDEBUG seem to cause problems with test execution :-( if(function_exists('xdebug_disable')) xdebug_disable(); @@ -230,6 +232,10 @@ class TestRunner extends Controller { if(!Director::is_cli()) echo '
Total time: " . round($endTime-$startTime,3) . " seconds
\n"; if(!Director::is_cli()) echo '