Module: tools Branch: master Commit: 05f25bd2342c0811927720f1e5d14e034dae525c URL: https://gitlab.winehq.org/winehq/tools/-/commit/05f25bd2342c0811927720f1e5d1...
Author: Francois Gouget fgouget@codeweavers.com Date: Sun Oct 2 17:54:48 2022 +0200
testbot: Add an option to test patchsets in one go.
With this option a single result message is sent for the full patchset. This may mean missing issues fixed in later parts but avoids multiple reports in case an early part introduces new failures.
---
testbot/lib/WineTestBot/Config.pm | 8 ++++++-- testbot/lib/WineTestBot/PendingPatchSets.pm | 14 +++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm index e0947b65..d1a24288 100644 --- a/testbot/lib/WineTestBot/Config.pm +++ b/testbot/lib/WineTestBot/Config.pm @@ -30,7 +30,7 @@ use vars qw (@ISA @EXPORT @EXPORT_OK $UseSSL $LogDir $DataDir $BinDir $MaxRevertsWhileRunningVMs $MaxActiveVMs $MaxRunningVMs $MaxVMsWhenIdle $WaitForBoot $SleepAfterBoot $SleepAfterRevert $VMToolTimeout $WaitForShutdown $MaxVMErrors $MaxTaskTries - $AdminEMail $RobotEMail + $OnlyCompletePatchSets $AdminEMail $RobotEMail $WinePatchToOverride $WinePatchCc $WineBugUrl $ReconfigBuildTimeout $ExeBuildTimeout $ExeModuleTimeout $WineBuildTimeout $WineModuleTimeout $TimeoutMargin @@ -47,7 +47,7 @@ require Exporter; $MaxRevertingVMs $MaxRevertsWhileRunningVMs $MaxActiveVMs $MaxRunningVMs $MaxVMsWhenIdle $WaitForBoot $SleepAfterBoot $SleepAfterRevert $VMToolTimeout $WaitForShutdown - $MaxVMErrors $MaxTaskTries $AdminEMail + $MaxVMErrors $MaxTaskTries $OnlyCompletePatchSets $AdminEMail $RobotEMail $WinePatchToOverride $WinePatchCc $WineBugUrl $ReconfigBuildTimeout $ExeBuildTimeout $ExeModuleTimeout $WineBuildTimeout $WineModuleTimeout $TimeoutMargin @@ -114,6 +114,10 @@ $MaxVMErrors = 3; # How many times to run a test that fails before giving up. $MaxTaskTries = 3;
+# Set to true if the combined patchset should be tested all at once +# instead of testing the individual parts one by one. +$OnlyCompletePatchSets = undef; + # Build configure timeout (in seconds) $ReconfigBuildTimeout = 60;
diff --git a/testbot/lib/WineTestBot/PendingPatchSets.pm b/testbot/lib/WineTestBot/PendingPatchSets.pm index 51a1d134..070a71df 100644 --- a/testbot/lib/WineTestBot/PendingPatchSets.pm +++ b/testbot/lib/WineTestBot/PendingPatchSets.pm @@ -104,6 +104,13 @@ sub SubmitSubset($$$) { my ($self, $MaxPart, $FinalPatch) = @_;
+ if ($OnlyCompletePatchSets and $MaxPart < $self->TotalParts) + { + # Skip over the intermediate patches to instead + # test the full patchset at once it is complete. + return undef; + } + my ($CombinedFile, $CombinedFileName) = OpenNewFile("$DataDir/staging", "_patchset.diff"); return "Could not create a combined patch file: $!" if (!$CombinedFile);
@@ -117,8 +124,13 @@ sub SubmitSubset($$$) last; }
- if ($PartNo == $MaxPart and $PartNo > 1) + if ($OnlyCompletePatchSets) + { + ; # Intermediate parts were not tested so everything must be tested now + } + elsif ($PartNo == $MaxPart and $PartNo > 1) { + # Everything up to the last part separator has already been tested print $CombinedFile LastPartSeparator(); } if (open(my $PartFile, "<" , "$DataDir/patches/" . $Part->Patch->Id))