Module: tools
Branch: master
Commit: 163f82f5ce26a965f3869f19eef15b16aa1107b0
URL: https://source.winehq.org/git/tools.git/?a=commit;h=163f82f5ce26a965f3869f1…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Jun 14 10:38:35 2018 +0200
testbot/web: Only create a build step if there are VMs that need it.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/web/Submit.pl | 65 ++++++++++++++++++++++++++-------------------------
1 file changed, 33 insertions(+), 32 deletions(-)
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index 1425301..c16b99f 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -2,6 +2,7 @@
# WineTestBot job submit page
#
# Copyright 2009 Ge van Geldorp
+# Copyright 2012-2014, 2017-2018 Francois Gouget
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -765,44 +766,16 @@ sub OnSubmit($)
}
my $Steps = $NewJob->Steps;
- my $BuildStep;
- my $FileType = $self->GetParam("FileType");
- if ($FileType eq "patchdlls")
- {
- # This is a patch so add a build step...
- $BuildStep = $Steps->Add();
- $BuildStep->FileName($BaseName);
- $BuildStep->FileType($FileType);
- $BuildStep->InStaging(!1);
- $BuildStep->Type("build");
- $BuildStep->DebugLevel(0);
-
- # ...with a build task
- my $VMs = CreateVMs();
- $VMs->AddFilter("Type", ["build"]);
- $VMs->AddFilter("Role", ["base"]);
- my $BuildVM = ${$VMs->GetItems()}[0];
- my $Task = $BuildStep->Tasks->Add();
- $Task->VM($BuildVM);
- $Task->Timeout($BuildTimeout);
-
- # Save the build step so the others can reference it
- my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
- if (defined($ErrMessage))
- {
- $self->{ErrMessage} = $ErrMessage;
- return !1;
- }
- }
-
# Add steps and tasks for the 32 and 64-bit tests
+ my $FileType = $self->GetParam("FileType");
+ my $BuildStep;
foreach my $Bits ("32", "64")
{
next if ($Bits eq "32" && $FileType eq "exe64");
next if ($Bits eq "64" && $FileType eq "exe32");
next if ($Bits eq "64" && $FileType eq "patchdlls" && !defined($self->GetParam("Run64")));
- my $Tasks;
+ my $Tasks;
my $VMs = CreateVMs();
$VMs->AddFilter("Type", $Bits eq "32" ? ["win32", "win64"] : ["win64"]);
my $SortedKeys = $VMs->SortKeysBySortOrder($VMs->GetKeys());
@@ -814,7 +787,35 @@ sub OnSubmit($)
if (!$Tasks)
{
- # First create the test step
+ if (!$BuildStep and $FileType eq "patchdlls")
+ {
+ # This is a patch so add a build step...
+ $BuildStep = $Steps->Add();
+ $BuildStep->FileName($BaseName);
+ $BuildStep->FileType($FileType);
+ $BuildStep->InStaging(!1);
+ $BuildStep->Type("build");
+ $BuildStep->DebugLevel(0);
+
+ # ...with a build task
+ my $VMs = CreateVMs();
+ $VMs->AddFilter("Type", ["build"]);
+ $VMs->AddFilter("Role", ["base"]);
+ my $BuildVM = ${$VMs->GetItems()}[0];
+ my $Task = $BuildStep->Tasks->Add();
+ $Task->VM($BuildVM);
+ $Task->Timeout($BuildTimeout);
+
+ # Save the build step so the others can reference it
+ my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
+ if (defined($ErrMessage))
+ {
+ $self->{ErrMessage} = $ErrMessage;
+ return !1;
+ }
+ }
+
+ # Then create the test step
my $TestStep = $Steps->Add();
if ($FileType eq "patchdlls")
{
Module: tools
Branch: master
Commit: df71920b8680b33367b231b6de20c2aa204de2ae
URL: https://source.winehq.org/git/tools.git/?a=commit;h=df71920b8680b33367b231b…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Jun 14 10:37:30 2018 +0200
testbot/build: Save the full list of Wine files.
The list can later be used by the TestBot to better identify Wine
patches.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/PatchUtils.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm
index 3a555af..14a5985 100644
--- a/testbot/lib/WineTestBot/PatchUtils.pm
+++ b/testbot/lib/WineTestBot/PatchUtils.pm
@@ -42,7 +42,7 @@ use WineTestBot::Config;
=item C<UpdateWineData()>
Updates the summary information about the Wine source such as the list of
-tests (testlist.txt).
+tests (testlist.txt) and the full list of Wine files.
=back
=cut
@@ -51,6 +51,11 @@ sub UpdateWineData($)
{
my ($WineDir) = @_;
+ mkdir "$DataDir/latest" if (!-d "$DataDir/latest");
+
+ my $ErrMessage = `cd '$WineDir' && git ls-tree -r --name-only HEAD 2>&1 >'$DataDir/latest/winefiles.txt'`;
+ return $ErrMessage if ($? != 0);
+
if (open(my $fh, ">", "$DataDir/testlist.txt"))
{
foreach my $TestFile (glob("$WineDir/*/*/tests/*.c"),