mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03: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 Logger;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
use POSIX qw(_exit dup2);
|
use POSIX qw(_exit dup2);
|
||||||
|
use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC);
|
||||||
|
|
||||||
$SIG{PIPE} = 'IGNORE'; # because Unix domain sockets may die unexpectedly
|
$SIG{PIPE} = 'IGNORE'; # because Unix domain sockets may die unexpectedly
|
||||||
|
|
||||||
@ -179,7 +180,12 @@ END {
|
|||||||
$log->close();
|
$log->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $now1 = clock_gettime(CLOCK_MONOTONIC);
|
||||||
|
|
||||||
runTests;
|
runTests;
|
||||||
|
|
||||||
|
my $now2 = clock_gettime(CLOCK_MONOTONIC);
|
||||||
|
|
||||||
|
printf STDERR "test script finished in %.2fs\n", $now2 - $now1;
|
||||||
|
|
||||||
exit ($nrSucceeded < $nrTests ? 1 : 0);
|
exit ($nrSucceeded < $nrTests ? 1 : 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user