compare_dg_tests.pl: Prefix test name with testsuite and .exp file name
This will help report regressions or start bisections .
The .exp file name is still listed at the beginning of the section,
the reason it was only present there so far was to make reports more
compact.
This change showed that an .exp file didn't have the expected name in
sum-2.txt, so it is updated as needed, along with the expected
results.
Change-Id: I7571a59d291d77f6e7db51b598c1dc98e0c1ae7d
diff --git a/compare_dg_tests.pl b/compare_dg_tests.pl
index c200426..bf391cc 100755
--- a/compare_dg_tests.pl
+++ b/compare_dg_tests.pl
@@ -282,6 +282,7 @@
my %unsupported;
$res->{testcases} = \%testcases;
my $pending_timeout=0;
+ my $current_tool="";
my $current_exp="";
$res->{EXEC}->{PASS} = 0;
@@ -295,10 +296,13 @@
my ($diag,$tc) = ($1,$2);
my %tcresult;
$tc =~ s/==[0-9]+== Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly./==<pid>== Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly./;
+ # Prefix test name wih .exp filename to help report
+ # regressions/run bisect.
+ $tc = "$current_tool:$current_exp=$tc";
$testcases{$tc} = empty_result() if (not exists $testcases{$tc});
$testcases{$tc}->{$diag}++;
$testcases{$tc}->{HAS_TIMED_OUT} = $pending_timeout;
- $testcases{$tc}->{EXP} = $current_exp;
+ $testcases{$tc}->{TOOL_EXP} = "$current_tool:$current_exp";
$testcases{$tc}->{NB}++;
$pending_timeout = 0;
$res->{$diag}++;
@@ -330,6 +334,15 @@
$current_exp=$1;
$current_exp =~ s|.*/testsuite/||;
}
+ elsif (m/^\t\t=== (.*) tests ===/)
+ {
+ $current_tool=$1;
+ }
+ elsif (m/^\t\t=== (.*) Summary ===/)
+ {
+ $current_tool="";
+ $current_exp="";
+ }
}
close SUMFILE;
return $res;
@@ -488,7 +501,7 @@
if (not exists $ref->{testcases}->{$key}) {
$ref->{testcases}->{$key} = empty_result();
$ref->{testcases}->{$key}->{NO_EXIST} = 1;
- $ref->{testcases}->{$key}->{EXP} = $res->{testcases}->{$key}->{EXP};
+ $ref->{testcases}->{$key}->{TOOL_EXP} = $res->{testcases}->{$key}->{TOOL_EXP};
}
# Consistency check, useful in case of duplicate test names
@@ -507,7 +520,7 @@
{
$res->{testcases}->{$key} = empty_result();
$res->{testcases}->{$key}->{NO_EXIST} = 1;
- $res->{testcases}->{$key}->{EXP} = $ref->{testcases}->{$key}->{EXP};
+ $res->{testcases}->{$key}->{TOOL_EXP} = $ref->{testcases}->{$key}->{TOOL_EXP};
}
# No need for similar consistency check: since we are
@@ -572,15 +585,15 @@
# The 1st parameter is used to find the name of the .exp file
# associated with the testcase.
my ($this_res, $cat, @tclist) = @_;
- my $this_exp = "";
+ my $this_tool_exp = "";
if (scalar(@tclist))
{
print " - ".$cat.":\n\n";
foreach my $case (@tclist)
{
- if ($this_exp ne $this_res->{testcases}->{$case}->{EXP}) {
- $this_exp = $this_res->{testcases}->{$case}->{EXP};
- print " Executed from: $this_exp\n";
+ if ($this_tool_exp ne $this_res->{testcases}->{$case}->{TOOL_EXP}) {
+ $this_tool_exp = $this_res->{testcases}->{$case}->{TOOL_EXP};
+ print " Executed from: $this_tool_exp\n";
}
print " $case\n";
}