on master help sign in
Gather timing data for tests.

To aid in the managment of the test suit, the perl script now records the duration of each test for compilation and execution. The resulting time is then displayed to stdout in the form: Duration of <test name> was <time> When running tests locally, test output can be grep'd and graphs plotted. A good improvement will be the automatic storing of the results in a dat file.

commit9cfd857916c3b0c4b5160374e6bc4cb3de510217 authorJan de Muijnck-Hughes <jfdm@st-andrews.ac.uk> dateThu 10 Dec 2015, 22:30 (11 years ago) parent2da8c19
1 file changed+6
test/runtest.pl+6
test/runtest.pl+6
@@ -55,10 +55,16 @@ sub runtest {
5555
5656 chdir($test);
5757
58+ my $startTime = time();
5859 print "Running $test...\n";
5960 my $got = `$sandbox ./run @idrOpts`;
6061 my $exp = `cat expected`;
6162
63+ my $endTime = time();
64+ my $elapsedTime = $endTime - $startTime;
65+
66+ print "Duration of $test was $elapsedTime\n";
67+
6268 # Allow for variant expected output for tests by overriding expected
6369 # when there is an expected.<os> file in the test.
6470 # This should be the exception but there are sometimes valid reasons