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.
This commit is contained in:
Jan de Muijnck-Hughes 2015-12-10 22:30:18 +00:00
parent 2da8c19259
commit 9cfd857916

View File

@ -55,10 +55,16 @@ sub runtest {
chdir($test);
my $startTime = time();
print "Running $test...\n";
my $got = `$sandbox ./run @idrOpts`;
my $exp = `cat expected`;
my $endTime = time();
my $elapsedTime = $endTime - $startTime;
print "Duration of $test was $elapsedTime\n";
# Allow for variant expected output for tests by overriding expected
# when there is an expected.<os> file in the test.
# This should be the exception but there are sometimes valid reasons