Check that the patched module has tests (Files field), not that it has patched test units (Units field).
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/build/WineTest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/bin/build/WineTest.pl b/testbot/bin/build/WineTest.pl index 893a74dd59..efd1498445 100755 --- a/testbot/bin/build/WineTest.pl +++ b/testbot/bin/build/WineTest.pl @@ -140,7 +140,7 @@ sub TestPatch($$) { # When given a module name WineTest runs all its tests. # But make sure the module actually has tests first! - push @TestList, $Module if (%{$TestInfo->{Units}}); + push @TestList, $Module if (%{$TestInfo->{Files}}); } else {
It is not a list of all the module's test units.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/build/WineTest.pl | 4 ++-- testbot/lib/WineTestBot/PatchUtils.pm | 6 +++--- testbot/lib/WineTestBot/Patches.pm | 4 ++-- testbot/web/Submit.pl | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/testbot/bin/build/WineTest.pl b/testbot/bin/build/WineTest.pl index efd1498445..cb83642e16 100755 --- a/testbot/bin/build/WineTest.pl +++ b/testbot/bin/build/WineTest.pl @@ -144,9 +144,9 @@ sub TestPatch($$) } else { - foreach my $Unit (sort keys %{$TestInfo->{Units}}) + foreach my $PatchedUnit (sort keys %{$TestInfo->{PatchedUnits}}) { - push @TestList, "$Module:$Unit"; + push @TestList, "$Module:$PatchedUnit"; } } } diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm index 0e17a70002..6009264a7d 100644 --- a/testbot/lib/WineTestBot/PatchUtils.pm +++ b/testbot/lib/WineTestBot/PatchUtils.pm @@ -405,7 +405,7 @@ sub GetPatchImpacts($) } }
- $TestInfo->{Units} = {}; + $TestInfo->{PatchedUnits} = {}; foreach my $File (keys %{$TestInfo->{Files}}) { my $Base = $File; @@ -418,7 +418,7 @@ sub GetPatchImpacts($)
if ($TestInfo->{All} or $TestInfo->{Files}->{$File}) { - $TestInfo->{Units}->{$Base} = 1; + $TestInfo->{PatchedUnits}->{$Base} = 1; $Impacts->{ModuleUnitCount}++; } elsif ($TestInfo->{PatchedModule}) @@ -428,7 +428,7 @@ sub GetPatchImpacts($) } }
- $TestInfo->{UnitCount} = scalar(keys %{$TestInfo->{Units}}); + $TestInfo->{UnitCount} = scalar(keys %{$TestInfo->{PatchedUnits}}); $Impacts->{TestUnitCount} += $TestInfo->{UnitCount}; }
diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm index e621e8845d..8a22d3a5ad 100644 --- a/testbot/lib/WineTestBot/Patches.pm +++ b/testbot/lib/WineTestBot/Patches.pm @@ -181,7 +181,7 @@ sub Submit($$$) foreach my $Module (sort keys %{$Impacts->{Tests}}) { my $TestInfo = $Impacts->{Tests}->{$Module}; - foreach my $Unit (sort keys %{$TestInfo->{Units}}) + foreach my $PatchedUnit (sort keys %{$TestInfo->{PatchedUnits}}) { foreach my $Bits ("32", "64") { @@ -236,7 +236,7 @@ sub Submit($$$) $Task->VM($VM); $Task->Timeout($SingleTimeout); $Task->Missions($TaskMissions->{Statement}); - $Task->CmdLineArg($Unit); + $Task->CmdLineArg($PatchedUnit); } } } diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl index bcb5458ad5..85a12a0f09 100644 --- a/testbot/web/Submit.pl +++ b/testbot/web/Submit.pl @@ -611,7 +611,7 @@ sub DetermineFileType($$) { $FileType = "patch"; $ExeBase = $TestInfo->{ExeBase}; - $TestUnit = (keys %{$TestInfo->{Units}})[0]; + $TestUnit = (keys %{$TestInfo->{PatchedUnits}})[0]; last; } }