winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2018
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
629 discussions
Start a n
N
ew thread
Francois Gouget : testbot/WineSendLog: Use LogUtils to identify errors in the log files.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: tools Branch: master Commit: 2ce3e4cf9d1ef1ce3314770f40a3a4037aaa06b3 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=2ce3e4cf9d1ef1ce3314770…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jun 26 13:29:55 2018 +0200 testbot/WineSendLog: Use LogUtils to identify errors in the log files. GetLogLineCategory()'s error detection is much more complete and this avoids code duplication. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/bin/WineSendLog.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl index 2f09779..3397809 100755 --- a/testbot/bin/WineSendLog.pl +++ b/testbot/bin/WineSendLog.pl @@ -45,6 +45,7 @@ use Algorithm::Diff; use WineTestBot::Config; use WineTestBot::Jobs; use WineTestBot::Log; +use WineTestBot::LogUtils; use WineTestBot::StepsTasks; @@ -290,8 +291,8 @@ EOF { $CurrentDll = $1; } - if ($Line =~ m/: Test failed: / || $Line =~ m/ done \(258\)/ || - $Line =~ m/: unhandled exception [0-9a-fA-F]{8} at /) + my $Category = GetLogLineCategory($Line); + if ($Category eq "error") { if ($PrintedDll ne $CurrentDll) {
1
0
0
0
Francois Gouget : testbot: Avoid duplicating the part boundary uuid.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: tools Branch: master Commit: aeaacbbe0e168bb3cf217a397fcd6873347b839e URL:
https://source.winehq.org/git/tools.git/?a=commit;h=aeaacbbe0e168bb3cf217a3…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jun 26 13:29:39 2018 +0200 testbot: Avoid duplicating the part boundary uuid. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/bin/WineSendLog.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl index ed3453b..2f09779 100755 --- a/testbot/bin/WineSendLog.pl +++ b/testbot/bin/WineSendLog.pl @@ -48,6 +48,9 @@ use WineTestBot::Log; use WineTestBot::StepsTasks; +my $PART_BOUNDARY = "==13F70BD1-BA1B-449A-9CCB-B6A8E90CED47=="; + + # # Logging and error handling helpers # @@ -241,9 +244,9 @@ sub SendLog($) } print SENDMAIL <<"EOF"; MIME-Version: 1.0 -Content-Type: multipart/mixed; boundary="==13F70BD1-BA1B-449A-9CCB-B6A8E90CED47==" +Content-Type: multipart/mixed; boundary="$PART_BOUNDARY" ---==13F70BD1-BA1B-449A-9CCB-B6A8E90CED47== +--$PART_BOUNDARY Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit @@ -374,7 +377,7 @@ EOF my $StepTask = $StepsTasks->GetItem($Key); print SENDMAIL <<"EOF"; ---==13F70BD1-BA1B-449A-9CCB-B6A8E90CED47== +--$PART_BOUNDARY Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit @@ -414,7 +417,7 @@ EOF } } - print SENDMAIL "--==13F70BD1-BA1B-449A-9CCB-B6A8E90CED47==--\n"; + print SENDMAIL "--$PART_BOUNDARY--\n"; close(SENDMAIL); # This is all for jobs submitted from the website
1
0
0
0
Francois Gouget : testbot/WineSendLog: Add proper command line handling and options.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: tools Branch: master Commit: 3941605cb602151e668db028c6e41c784cfb4cc9 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=3941605cb602151e668db02…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jun 26 13:29:25 2018 +0200 testbot/WineSendLog: Add proper command line handling and options. When run in --debug mode WineSendLog prints the emails it would normally send instead of piping them to sendmail. Also the script now prints the error messages to stderr by default to make it easier to figure things out when running it on the command line. The --log-only option can be used when that's not desired. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/bin/Engine.pl | 2 +- testbot/bin/WineSendLog.pl | 193 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 164 insertions(+), 31 deletions(-) diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl index ce35094..464b6db 100755 --- a/testbot/bin/Engine.pl +++ b/testbot/bin/Engine.pl @@ -320,7 +320,7 @@ sub HandleJobStatusChange($$$) CloseAllDBBackEnds(); WineTestBot::Log::SetupRedirects(); - exec("$BinDir/${ProjectName}SendLog.pl $JobKey") or + exec("$BinDir/${ProjectName}SendLog.pl --log-only $JobKey") or LogMsg "Unable to exec ${ProjectName}SendLog.pl: $!\n"; exit(1); } diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl index e03395a..ed3453b 100755 --- a/testbot/bin/WineSendLog.pl +++ b/testbot/bin/WineSendLog.pl @@ -36,14 +36,47 @@ sub BEGIN unshift @INC, "$::RootDir/lib"; } } +my $Name0 = $0; +$Name0 =~ s+^.*/++; + use Algorithm::Diff; + use WineTestBot::Config; use WineTestBot::Jobs; use WineTestBot::Log; use WineTestBot::StepsTasks; +# +# Logging and error handling helpers +# + +my $Debug; +sub Debug(@) +{ + print STDERR @_ if ($Debug); +} + +sub DebugTee($@) +{ + my ($File) = shift; + print $File @_; + Debug(@_); +} + +my $LogOnly; +sub Error(@) +{ + print STDERR "$Name0:error: ", @_ if (!$LogOnly); + LogMsg @_; +} + + +# +# Log analysis +# + sub IsBotFailure($) { my ($ErrLine) = @_; @@ -121,7 +154,7 @@ sub ReadLog($$$) } else { - LogMsg "Unable to open '$LogName' for reading: $!\n"; + Error "Unable to open '$LogName' for reading: $!\n"; } return \@Messages; @@ -179,7 +212,19 @@ sub SendLog($) my $StepsTasks = CreateStepsTasks(undef, $Job); my @SortedKeys = sort @{$StepsTasks->GetKeys()}; - open (SENDMAIL, "|/usr/sbin/sendmail -oi -t -odq"); + # + # Send a job summary and all the logs as attachments to the developer + # + + Debug("-------------------- Developer email --------------------\n"); + if ($Debug) + { + open(SENDMAIL, ">>&=", 1); + } + else + { + open (SENDMAIL, "|/usr/sbin/sendmail -oi -t -odq"); + } print SENDMAIL "From: $RobotEMail\n"; print SENDMAIL "To: $To\n"; my $Subject = "TestBot job " . $Job->Id . " results"; @@ -218,6 +263,7 @@ EOF $TestFailures; } + # Print the job summary my @FailureKeys; foreach my $Key (@SortedKeys) { @@ -322,6 +368,7 @@ EOF } } + # Print the log attachments foreach my $Key (@SortedKeys) { my $StepTask = $StepsTasks->GetItem($Key); @@ -334,6 +381,7 @@ Content-Transfer-Encoding: 8bit EOF print SENDMAIL "Content-Disposition: attachment; filename=", $StepTask->VM->Name, ".log\n\n"; + print SENDMAIL "Not dumping logs in debug mode\n" if ($Debug); my $PrintSeparator = !1; my $TaskDir = $StepTask->GetTaskDir(); @@ -343,7 +391,7 @@ EOF while (defined($Line = <LOGFILE>)) { $Line =~ s/\s*$//; - print SENDMAIL "$Line\n"; + print SENDMAIL "$Line\n" if (!$Debug); $PrintSeparator = 1; } close LOGFILE; @@ -356,11 +404,11 @@ EOF { if ($PrintSeparator) { - print SENDMAIL "\n"; + print SENDMAIL "\n" if (!$Debug); $PrintSeparator = !1; } $Line =~ s/\s*$//; - print SENDMAIL "$Line\n"; + print SENDMAIL "$Line\n" if (!$Debug); } close ERRFILE; } @@ -369,10 +417,12 @@ EOF print SENDMAIL "--==13F70BD1-BA1B-449A-9CCB-B6A8E90CED47==--\n"; close(SENDMAIL); - if (! defined($Job->Patch)) - { - return; - } + # This is all for jobs submitted from the website + return if (!defined $Job->Patch); + + # + # Build a job summary with only the new errors + # my $Messages = ""; foreach my $Key (@FailureKeys) @@ -401,7 +451,7 @@ EOF } else { - LogMsg "BotFailure found in ${LatestName}.err\n"; + Error "BotFailure found in ${LatestName}.err\n"; } if ($MessagesFromErr || $MessagesFromLog) { @@ -411,15 +461,28 @@ EOF } elsif ($BotFailure) { - LogMsg "BotFailure found in $TaskDir/err\n"; + Error "BotFailure found in $TaskDir/err\n"; } } + # + # Send a summary of the new errors to the mailing list + # + + Debug("\n-------------------- Mailing list email --------------------\n"); + my $WebSite = ($UseSSL ? "https://" : "http://") . $WebHostName; if ($Messages) { - open (SENDMAIL, "|/usr/sbin/sendmail -oi -t -odq"); + if ($Debug) + { + open(SENDMAIL, ">>&=", 1); + } + else + { + open (SENDMAIL, "|/usr/sbin/sendmail -oi -t -odq"); + } print SENDMAIL "From: $RobotEMail\n"; print SENDMAIL "To: $To\n"; print SENDMAIL "Cc: $WinePatchCc\n"; @@ -445,6 +508,14 @@ EOF print SENDMAIL $Messages; close SENDMAIL; } + else + { + Debug("Found no error to report to the mailing list\n"); + } + + # + # Create a .testbot file for the patches website + # my $Patch = $Job->Patch; if (defined $Patch->WebPatchId and -d "$DataDir/webpatches") @@ -452,9 +523,12 @@ EOF my $BaseName = "$DataDir/webpatches/" . $Patch->WebPatchId; if (open (my $result, ">", "$BaseName.testbot")) { - print $result "Status: " . ($Messages ? "Failed" : "OK") . "\n"; - print $result "Job-ID: " . $Job->Id . "\n"; - print $result "URL: $WebSite/JobDetails.pl?Key=" . $Job->GetKey() . "\n"; + Debug("\n-------------------- WebPatches report --------------------\n"); + # Only take into account new errors to decide whether the job was + # successful or not. + DebugTee($result, "Status: ". ($Messages ? "Failed" : "OK") ."\n"); + DebugTee($result, "Job-ID: ". $Job->Id ."\n"); + DebugTee($result, "URL: $WebSite/JobDetails.pl?Key=". $Job->GetKey() ."\n"); foreach my $Key (@SortedKeys) { @@ -496,7 +570,7 @@ EOF } else { - LogMsg "Job " . $Job->Id . ": Unable to open '$BaseName.testbot' for writing: $!"; + Error "Job ". $Job->Id .": Unable to open '$BaseName.testbot' for writing: $!"; } } } @@ -509,37 +583,96 @@ EOF $ENV{PATH} = "/usr/bin:/bin"; delete $ENV{ENV}; -my $JobId = $ARGV[0]; -if (! $JobId) +my $Usage; +sub ValidateNumber($$) +{ + my ($Name, $Value) = @_; + + # Validate and untaint the value + return $1 if ($Value =~ /^(\d+)$/); + Error "$Value is not a valid $Name\n"; + $Usage = 2; + return undef; +} + +my ($JobId); +while (@ARGV) { - die "Usage: WineSendLog.pl JobId"; + my $Arg = shift @ARGV; + if ($Arg eq "--debug") + { + $Debug = 1; + } + elsif ($Arg eq "--log-only") + { + $LogOnly = 1; + } + elsif ($Arg =~ /^(?:-\?|-h|--help)$/) + { + $Usage = 0; + last; + } + elsif ($Arg =~ /^-/) + { + Error "unknown option '$Arg'\n"; + $Usage = 2; + last; + } + elsif (!defined $JobId) + { + $JobId = ValidateNumber('job id', $Arg); + } + else + { + Error "unexpected argument '$Arg'\n"; + $Usage = 2; + last; + } } -# Untaint parameters -if ($JobId =~ /^(\d+)$/) +# Check parameters +if (!defined $Usage) { - $JobId = $1; + if (!defined $JobId) + { + Error "you must specify the job id\n"; + $Usage = 2; + } } -else +if (defined $Usage) { - LogMsg "Invalid JobId $JobId\n"; - exit(1); + if ($Usage) + { + Error "try '$Name0 --help' for more information\n"; + exit $Usage; + } + print "Usage: $Name0 [--debug] [--help] JOBID\n"; + print "\n"; + print "Analyze the job's logs and notifies the developer and the patches website.\n"; + print "\n"; + print "Where:\n"; + print " JOBID Id of the job to report on.\n"; + print " --debug More verbose messages for debugging.\n"; + print " --log-only Only send error messages to the log instead of also printing them\n"; + print " on stderr.\n"; + print " --help Shows this usage message.\n"; + exit 0; } my $Job = CreateJobs()->GetItem($JobId); -if (! defined($Job)) +if (!defined $Job) { - LogMsg "Job $JobId doesn't exist\n"; - exit(1); + Error "Job $JobId doesn't exist\n"; + exit 1; } # -# Analyze the log and notify the developer +# Analyze the log, notify the developer and the Patches website # SendLog($Job); LogMsg "Log for job $JobId sent\n"; -exit(0); +exit 0;
1
0
0
0
Francois Gouget : testbot/web: Let LogUtils build the list of task reports and logs.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: tools Branch: master Commit: 6e4ee08776b7aea8cac264487d6976cd6cc21501 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=6e4ee08776b7aea8cac2644…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jun 26 13:23:46 2018 +0200 testbot/web: Let LogUtils build the list of task reports and logs. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/lib/WineTestBot/LogUtils.pm | 55 ++++++++++++++++++++++++++++++++++++- testbot/web/JobDetails.pl | 20 ++++---------- 2 files changed, 60 insertions(+), 15 deletions(-) diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index daa9c0b..3dfd7c5 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -27,7 +27,7 @@ WineTestBot::LogUtils - Provides functions to parse task logs use Exporter 'import'; -our @EXPORT = qw(GetLogLineCategory ParseTaskLog); +our @EXPORT = qw(GetLogFileNames GetLogLabel GetLogLineCategory ParseTaskLog); # @@ -133,4 +133,57 @@ sub GetLogLineCategory($) return "none"; } +=pod +=over 12 + +=item C<GetLogFileNames()> + +Scans the directory for test reports and task logs and returns their filenames. +The filenames are returned in the order in which the logs are meant to be +presented. + +=back +=cut + +sub GetLogFileNames($;$) +{ + my ($Dir, $IncludeOld) = @_; + + my @Candidates = ("exe32.report", "exe64.report", + "log", "err"); + push @Candidates, "log.old", "err.old" if ($IncludeOld); + + my @Logs; + foreach my $FileName (@Candidates) + { + push @Logs, $FileName if (-f "$Dir/$FileName" and !-z "$Dir/$FileName"); + } + return \@Logs; +} + +my %_LogFileLabels = ( + "exe32.report" => "32 bit Windows report", + "exe64.report" => "64 bit Windows report", + "err" => "task errors", + "log" => "task log", + "err.old" => "old task errors", + "log.old" => "old logs", +); + +=pod +=over 12 + +=item C<GetLogLabel()> + +Returns a user-friendly description of the content of the specified log file. + +=back +=cut + +sub GetLogLabel($) +{ + my ($LogFileName) = @_; + return $_LogFileLabels{$LogFileName}; +} + 1; diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index 07924f4..e5f7929 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -261,14 +261,6 @@ sub GetHtmlLine($$$) return $Html; } -my @MILogFiles = qw(exe32.report exe64.report log log.old); -my %MILogLabels = ( - "exe32.report" => "32 bit Windows report", - "exe64.report" => "64 bit Windows report", - "log" => "task log", - "log.old" => "old logs", -); - sub InitMoreInfo($) { my ($self) = @_; @@ -282,15 +274,15 @@ sub InitMoreInfo($) my $Value = $self->GetParam("f$Key"); my $TaskDir = $StepTask->GetTaskDir(); - foreach my $Log (@MILogFiles) + foreach my $Log (@{GetLogFileNames($TaskDir, 1)}) { - if (!-f "$TaskDir/$Log" or -z "$TaskDir/$Log") + if ($Log =~ s/^err/log/) { - my $Err = $Log; - next if ($Err !~ s/^log/err/ or !-f "$TaskDir/$Err" or -z "$TaskDir/$Err"); + # We don't want separate entries for log* and err* but we also want a + # log* entry even if only err* exists. + next if (($More->{$Key}->{Logs}->[-1] || "") eq $Log); } push @{$More->{$Key}->{Logs}}, $Log; - $More->{$Key}->{Full} = $Log if (uri_escape($Log) eq $Value); } $More->{$Key}->{Full} ||= ""; @@ -385,7 +377,7 @@ sub GenerateBody($) foreach my $Log (@{$MoreInfo->{Logs}}) { - $self->GenerateMoreInfoLink($Key, $MILogLabels{$Log}, "Full", $Log); + $self->GenerateMoreInfoLink($Key, GetLogLabel($Log), "Full", $Log); } print "</div>\n";
1
0
0
0
Francois Gouget : testbot: Move log line categorization to LogUtils and simplify line highlighting.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: tools Branch: master Commit: b53aafbc9281d0b202fa5a7dc0b4682b2f21dfe9 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=b53aafbc9281d0b202fa5a7…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jun 26 13:23:25 2018 +0200 testbot: Move log line categorization to LogUtils and simplify line highlighting. GetLogLineCategory() identifies log lines of interest which makes it possible to decide how to display them. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/lib/WineTestBot/LogUtils.pm | 61 ++++++++++++++++++++++++++++- testbot/web/JobDetails.pl | 78 +++++++++++++------------------------ 2 files changed, 88 insertions(+), 51 deletions(-) diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index 3e40fbc..daa9c0b 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -27,7 +27,7 @@ WineTestBot::LogUtils - Provides functions to parse task logs use Exporter 'import'; -our @EXPORT = qw(ParseTaskLog); +our @EXPORT = qw(GetLogLineCategory ParseTaskLog); # @@ -74,4 +74,63 @@ sub ParseTaskLog($$) return "nolog:Unable to open the task log for reading: $!"; } + +# +# Log querying and formatting +# + +=pod +=over 12 + +=item C<GetLogLineCategory()> + +Identifies the category of the given log line: an error message, a todo, just +an informational message or none of these. The category can then be used to +decide whether to hide the line or, on the contrary, highlight it. + +=back +=cut + +sub GetLogLineCategory($) +{ + my ($Line) = @_; + + if ($Line =~ /: Test marked todo: /) + { + return "todo"; + } + if ($Line =~ /: Tests skipped: / or + $Line =~ /^\w+:\w+ skipped /) + { + return "skip"; + } + if ($Line =~ /: Test (?:failed|succeeded inside todo block): / or + $Line =~ /Fatal: test .* does not exist/ or + $Line =~ / done \(258\)/ or + $Line =~ /: unhandled exception [0-9a-fA-F]{8} at / or + $Line =~ /^Unhandled exception: / or + # Git errors + $Line =~ /^CONFLICT / or + $Line =~ /^error: patch failed:/ or + $Line =~ /^error: corrupt patch / or + # Build errors + $Line =~ /: error: / or + $Line =~ /^Makefile:[0-9]+: recipe for target .* failed$/ or + $Line =~ /^(?:Build|Reconfig|Task): (?!ok)/ or + # Typical perl errors + $Line =~ /^Use of uninitialized value/) + { + return "error"; + } + if ($Line =~ /^\+ \S/ or + $Line =~ /^\w+:\w+ start / or + # Build messages + $Line =~ /^(?:Build|Reconfig|Task): ok/) + { + return "info"; + } + + return "none"; +} + 1; diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index f05c0f6..07924f4 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -28,6 +28,7 @@ use URI::Escape; use WineTestBot::Config; use WineTestBot::Jobs; +use WineTestBot::LogUtils; use WineTestBot::StepsTasks; use WineTestBot::Engine::Notify; @@ -228,59 +229,36 @@ sub GeneratePage($) $self->SUPER::GeneratePage(); } +=pod +=over 12 + +=item C<GetHtmlLine()> + +Determines if the log line should be shown, how, and escapes it so it is valid +HTML. + +When not showing the full log, returns undef except for error messages which +are the only lines tha should be shown. +When showing the full log error messages and other lines of interest are +highlighted to make the log more readable. + +=back +=cut + sub GetHtmlLine($$$) { my ($self, $FullLog, $Line) = @_; - $Line = $self->escapeHTML($Line); - if ($Line =~ /: Test marked todo: /) - { - return (undef, $Line) if (!$FullLog); - my $Html = $Line; - $Html =~ s~^(.*\S)\s*\r?$~<span class='log-todo'>$1</span>~; - return ($Html, $Line); - } - if ($Line =~ /: Tests skipped: / or - $Line =~ /^\w+:\w+ skipped /) - { - return (undef, $Line) if (!$FullLog); - my $Html = $Line; - $Html =~ s~^(.*\S)\s*\r?$~<span class='log-skip'>$1</span>~; - return ($Html, $Line); - } - if ($Line =~ /: Test (?:failed|succeeded inside todo block): / or - $Line =~ /Fatal: test .* does not exist/ or - $Line =~ / done \(258\)/ or - $Line =~ /: unhandled exception [0-9a-fA-F]{8} at / or - $Line =~ /^Unhandled exception: / or - # Git errors - $Line =~ /^CONFLICT / or - $Line =~ /^error: patch failed:/ or - $Line =~ /^error: corrupt patch / or - # Build errors - $Line =~ /: error: / or - $Line =~ /^Makefile:[0-9]+: recipe for target .* failed$/ or - $Line =~ /^(?:Build|Reconfig|Task): (?!ok)/ or - # Typical perl errors - $Line =~ /^Use of uninitialized value/) - { - return ($Line, $Line) if (!$FullLog); - my $Html = $Line; - $Html =~ s~^(.*\S)\s*\r?$~<span class='log-error'>$1</span>~; - return ($Html, $Line); - } - if ($FullLog && - ($Line =~ /^\+ \S/ or - $Line =~ /^\w+:\w+ start / or - # Build messages - $Line =~ /^(?:Build|Reconfig|Task): ok/)) + my $Category = GetLogLineCategory($Line); + return undef if ($Category ne "error" and !$FullLog); + + my $Html = $self->escapeHTML($Line); + if ($FullLog and $Category ne "none") { - my $Html = $Line; - $Html =~ s~^(.*\S)\s*\r?$~<span class='log-info'>$1</span>~; - return ($Html, $Line); + # Highlight all line categories in the full log + $Html =~ s~^(.*\S)\s*\r?$~<span class='log-$Category'>$1</span>~; } - - return (undef, $Line); + return $Html; } my @MILogFiles = qw(exe32.report exe64.report log log.old); @@ -429,8 +407,8 @@ sub GenerateBody($) { $CurrentDll = $1; } - my ($Highlight, $Plain) = $self->GetHtmlLine($MoreInfo->{Full}, $Line); - next if (!$MoreInfo->{Full} and !defined $Highlight); + my $Html = $self->GetHtmlLine($MoreInfo->{Full}, $Line); + next if (!defined $Html); if ($PrintedDll ne $CurrentDll && !$MoreInfo->{Full}) { @@ -451,7 +429,7 @@ sub GenerateBody($) } else { - print(($Highlight || $Plain), "\n"); + print "$Html\n"; } } close($LogFile);
1
0
0
0
Francois Gouget : testbot/Janitor: Clean up the latest directory too.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: tools Branch: master Commit: f1b2a7ed3b7399390eaa4a7c85d341df5b295b44 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=f1b2a7ed3b7399390eaa4a7…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jun 26 11:03:41 2018 +0200 testbot/Janitor: Clean up the latest directory too. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/bin/Janitor.pl | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl index 9252efa..a9cdd52 100755 --- a/testbot/bin/Janitor.pl +++ b/testbot/bin/Janitor.pl @@ -299,6 +299,52 @@ else Error "Unable to open '$DataDir/staging': $!"; } +# Check the content of the latest directory +if (opendir(my $dh, "$DataDir/latest")) +{ + # We will be deleting files so read the directory in one go + my @Entries = readdir($dh); + close($dh); + + my $AllVMs = $VMs->Clone(); + foreach my $Entry (@Entries) + { + next if ($Entry eq "." or $Entry eq ".."); + $Entry =~ m%^([^/]+)$%; + my $FileName = "$DataDir/latest/$1"; + my $Age = int((-M $FileName) + 0.5); + + if ($Entry =~ /^(.*)_[a-z0-9]+\.(?:err|log)$/) + { + # Keep the reference WineTest reports for all VMs even if they are + # retired or scheduled for deletion. + my $VMName = $1; + next if ($AllVMs->GetItem($VMName)); + } + elsif ($Entry =~ /^(?:TestLauncher[0-9]*\.exe|winefiles.txt|winetest[0-9]*-latest\.exe)$/) + { + next; + } + + Trace "Found a suspicious latest file: $Entry\n"; + if ($JobPurgeDays != 0) + { + if ($Age >= $JobPurgeDays + 7) + { + DeletePath($FileName); + } + elsif ($Age > $JobPurgeDays) + { + Trace "'$FileName' will be deleted in ", $JobPurgeDays + 7 - $Age, " day(s).\n"; + } + } + } +} +else +{ + Error "Unable to open '$DataDir/latest': $!"; +} + # Delete obsolete record groups if ($JobPurgeDays != 0) {
1
0
0
0
Francois Gouget : testbot/Janitor: Add DeletePath() to simplify deleting file/directories.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: tools Branch: master Commit: ff79ab5a21866c01c67badda8e8f5957f7a6d065 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=ff79ab5a21866c01c67badd…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jun 26 11:03:28 2018 +0200 testbot/Janitor: Add DeletePath() to simplify deleting file/directories. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/bin/Janitor.pl | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl index 9fb38ef..9252efa 100755 --- a/testbot/bin/Janitor.pl +++ b/testbot/bin/Janitor.pl @@ -116,6 +116,17 @@ if (defined $Usage) # Main # +sub DeletePath($) +{ + my ($Path) = @_; + + Trace "Deleting '$Path'\n"; + if (!$DryRun and !rmtree($Path)) + { + Error "Could not delete '$Path': $!\n"; + } +} + # Delete obsolete Jobs if ($JobPurgeDays != 0) { @@ -268,11 +279,7 @@ if (opendir(my $dh, "$DataDir/staging")) { if ($Age >= $JobPurgeDays + 7) { - Trace "Deleting '$FileName'\n"; - if (!$DryRun and !rmtree($FileName)) - { - Error "Could not delete '$FileName': $!\n"; - } + DeletePath($FileName); } elsif ($Age > $JobPurgeDays) { @@ -282,12 +289,8 @@ if (opendir(my $dh, "$DataDir/staging")) } elsif ($Age >= 1) { - Trace "Deleting '$FileName'\n"; - if (!$DryRun and !unlink $FileName) - { - # The user abandoned the submit procedure half-way through - Error "Could not delete '$FileName': $!\n"; - } + # The user abandoned the submit procedure half-way through + DeletePath($FileName); } } }
1
0
0
0
Alexandre Julliard : Wine release 3.0.2
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: website Branch: master Commit: 57bcdcbe149582c0e1898c5eee80692cd0bd13c2 URL:
https://source.winehq.org/git/website.git/?a=commit;h=57bcdcbe149582c0e1898…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 26 11:44:37 2018 +0200 Wine release 3.0.2 Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- news/en/2018062601.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/news/en/2018062601.xml b/news/en/2018062601.xml new file mode 100644 index 0000000..170cd10 --- /dev/null +++ b/news/en/2018062601.xml @@ -0,0 +1,12 @@ +<news> +<date>June 26, 2018</date> +<title>Wine 3.0.2 Released</title> +<body> +<p> The Wine maintenance release 3.0.2 is now available.</p> +<p> <a href="{$root}/announce/3.0.2">What's new</a> in this release: +<ul> + <li>Various bug fixes</li> +</ul> +<p>The source is <a href="//dl.winehq.org/wine/source/3.0/wine-3.0.2.tar.xz">available now</a>. +Binary packages are in the process of being built, and will appear soon at their respective <a href="{$root}/download">download locations</a>. +</p></body></news>
1
0
0
0
Tag wine-3.0.2 : Alexandre Julliard : Release 3.0.2
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: refs/tags/wine-3.0.2 Tag: 33a4e30acd28d0a626f0646094db34998f2633ce URL:
https://source.winehq.org/git/wine.git/?a=tag;h=33a4e30acd28d0a626f0646094d…
Tagger: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 26 11:42:08 2018 +0200 Release 3.0.2
1
0
0
0
Michael Stefaniuc : Release 3.0.2.
by Alexandre Julliard
26 Jun '18
26 Jun '18
Module: wine Branch: stable Commit: b0192430380888bbd961c81c8b9baa32386337bf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b0192430380888bbd961c81c…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Sun Jun 10 23:48:56 2018 +0200 Release 3.0.2. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- ANNOUNCE | 389 ++++++++++++++++++++++++++++---------------------------------- AUTHORS | 5 + VERSION | 2 +- configure | 18 +-- 4 files changed, 193 insertions(+), 221 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=b0192430380888bbd961…
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
63
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Results per page:
10
25
50
100
200