Make sure Submit.pl picks the module with the modified tests even if the patch impacts other modules.
Signed-off-by: Francois Gouget fgouget@codeweavers.com ---
This only impacted the suggested command but could be confusing. Whether the command was correct or not depended on the order in the hashtable.
testbot/web/Submit.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl index d0da7a2497..c10a267909 100644 --- a/testbot/web/Submit.pl +++ b/testbot/web/Submit.pl @@ -604,10 +604,16 @@ sub DetermineFileType($$) } else { - my $TestInfo = (values %{$Impacts->{Tests}})[0]; - $FileType = "patch"; - $ExeBase = $TestInfo->{ExeBase}; - $TestUnit = (keys %{$TestInfo->{Units}})[0]; + foreach my $TestInfo (values %{$Impacts->{Tests}}) + { + if ($TestInfo->{UnitCount}) + { + $FileType = "patch"; + $ExeBase = $TestInfo->{ExeBase}; + $TestUnit = (keys %{$TestInfo->{Units}})[0]; + last; + } + } } } elsif ($FileType eq "dll32" || $FileType eq "dll64" || $FileType eq "zip")