mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
test-driver: Show test duration
This commit is contained in:
parent
5b1dad79cd
commit
996e0ef777
@ -8,6 +8,7 @@ use IO::Pty;
|
||||
use Logger;
|
||||
use Cwd;
|
||||
use POSIX qw(_exit dup2);
|
||||
use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC);
|
||||
|
||||
$SIG{PIPE} = 'IGNORE'; # because Unix domain sockets may die unexpectedly
|
||||
|
||||
@ -179,7 +180,12 @@ END {
|
||||
$log->close();
|
||||
}
|
||||
|
||||
my $now1 = clock_gettime(CLOCK_MONOTONIC);
|
||||
|
||||
runTests;
|
||||
|
||||
my $now2 = clock_gettime(CLOCK_MONOTONIC);
|
||||
|
||||
printf STDERR "test script finished in %.2fs\n", $now2 - $now1;
|
||||
|
||||
exit ($nrSucceeded < $nrTests ? 1 : 0);
|
||||
|
Loading…
Reference in New Issue
Block a user