Module: tools Branch: master Commit: a29481fe3b7135c37e84e08ab41e80e82b0ca204 URL: https://source.winehq.org/git/tools.git/?a=commit;h=a29481fe3b7135c37e84e08a...
Author: Francois Gouget fgouget@codeweavers.com Date: Wed Oct 17 16:25:11 2018 +0200
testbot/web: Fix picking which module to test.
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 Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 d0da7a2..c10a267 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")