Linux/ARM: Add execution time of ./tests/runtest.sh
authorGeunsik Lim <geunsik.lim@samsung.com>
Fri, 20 May 2016 13:31:32 +0000 (22:31 +0900)
committerGeunsik Lim <geunsik.lim@samsung.com>
Mon, 23 May 2016 22:29:47 +0000 (07:29 +0900)
We have to wait for a long time to complete all unit tests on the ARM-based
embedded boards (e.g, Raspberry Pi, Odroid, Chromebook) compared to the
X86-based server environment. So, let's display execution time after finishing
the unit test.

* After PR:
128 minutes and 36 seconds taken to run CoreCLR tests.

ver1:
The existing measured time still includes overlay creation and some
package restoration. So, let's put time_start in front of
if($testDirectories).

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Reviewed-by: Aditya Mandaleeka <adityamandaleeka@microsoft.com>
Reviewed-by: Sergiy Kuryata <sergiy-k@microsoft.com>
tests/runtest.sh

index 26500fc..64a3535 100755 (executable)
@@ -899,6 +899,7 @@ scriptPath=$(dirname $0)
 ${scriptPath}/setup-runtime-dependencies.sh --outputDir=$coreOverlayDir
 
 cd "$testRootDir"
+time_start=$(date +"%s")
 if [ -z "$testDirectories" ]
 then
     # No test directories were specified, so run everything in the current 
@@ -918,6 +919,11 @@ fi
 finish_remaining_tests
 
 print_results
+
+time_end=$(date +"%s")
+time_diff=$(($time_end-$time_start))
+echo "$(($time_diff / 60)) minutes and $(($time_diff % 60)) seconds taken to run CoreCLR tests."
+
 xunit_output_end
 
 if [ "$CoreClrCoverage" == "ON" ]