From d8e246cf8a4569baaa49359ceb3e21c7aa4af1f6 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Fri, 22 Oct 2010 11:56:40 +0400 Subject: Add a script for formating test result of st/subunit This script show the time of each test and tests are sorted by execution time (from the slowest to the quickest) Autobuild-User: Matthieu Patou Autobuild-Date: Tue Oct 26 20:42:11 UTC 2010 on sn-devel-104 --- source4/scripting/devel/show_test_time | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 source4/scripting/devel/show_test_time (limited to 'source4/scripting') diff --git a/source4/scripting/devel/show_test_time b/source4/scripting/devel/show_test_time new file mode 100755 index 0000000000..d9a18f034e --- /dev/null +++ b/source4/scripting/devel/show_test_time @@ -0,0 +1,19 @@ +#!/usr/bin/env perl +# +use strict; +my %h; +open(FH, "subunit-ls --times --no-passthrough|") || die "pb with subunit-ls"; +while() +{ + chomp(); + my @l = split(/ /); + my $val = @l[scalar(@l)-1]; + $h{join(' ',@l)} = $val; +} + +my @sorted = sort { $h{$b}<=>$h{$a} } keys(%h); +use Data::Dumper; +foreach my $l (@sorted) +{ + print "$l\n"; +} -- cgit