Module: tools
Branch: master
Commit: f7b0a4cc7e3a7f48a4f987ef4907ac753f5ff692
URL: http://source.winehq.org/git/tools.git/?a=commit;h=f7b0a4cc7e3a7f48a4f987ef…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed May 17 11:27:08 2017 +0200
winetest: Run build-index and/or build-errors as needed.
If a report has been accepted then run both gather and build-index to
refresh the index files.
If a report has been rejected run build-errors to update errors.html.
And if there is nothing new both can be skipped.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
winetest/winetest.cron | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/winetest/winetest.cron b/winetest/winetest.cron
index 45581e2..6b59f4f 100755
--- a/winetest/winetest.cron
+++ b/winetest/winetest.cron
@@ -39,15 +39,29 @@ if [ ! -f $lock ]; then
touch $lock
cd $workdir
- while $tools/dissect; [ $? -eq 0 -o $? -eq 1 ]; do true; done
- updated=0
- while $tools/gather; do updated=1; done
- if [ $updated -eq 1 -o ! -d data/tests -o ! -d old-data ]
+ refresh_index=""
+ refresh_errors=""
+ while true
+ do
+ $tools/dissect
+ case $? in
+ 0) refresh_index=1 ;;
+ 1) refresh_errors=1 ;;
+ *) break ;;
+ esac
+ done
+ if [ -n "$refresh_index" ]
+ then
+ while $tools/gather; do true; done
+ fi
+ if [ ! -d data/tests -o ! -d old-data ]
then
mkdir -p data/tests old-data
- $tools/build-index
- $tools/build-errors
+ refresh_index=1
+ refresh_errors=1
fi
+ [ -n "$refresh_index" ] && $tools/build-index
+ [ -n "$refresh_errors" ] && $tools/build-errors
# archive old results
(
Module: tools
Branch: master
Commit: 3430c7d94bba4789aea9766170a528b3f7b681c7
URL: http://source.winehq.org/git/tools.git/?a=commit;h=3430c7d94bba4789aea97661…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed May 17 11:27:01 2017 +0200
winetest: Refresh errors.html separately from the main index.
The two operations are quite independent.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
winetest/build-errors | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++
winetest/build-index | 41 ------------------------
winetest/winetest.cron | 1 +
3 files changed, 88 insertions(+), 41 deletions(-)
diff --git a/winetest/build-errors b/winetest/build-errors
new file mode 100755
index 0000000..a719fb5
--- /dev/null
+++ b/winetest/build-errors
@@ -0,0 +1,87 @@
+#!/usr/bin/perl
+#
+# Copyright 2008 Alexandre Julliard <julliard(a)winehq.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# This program creates the global index of rejected reports.
+
+use strict;
+use warnings;
+use open ':utf8';
+use CGI qw(:standard);
+
+sub BEGIN
+{
+ if ($0 !~ m=^/=)
+ {
+ # Turn $0 into an absolute path so it can safely be used in @INC
+ require Cwd;
+ $0 = Cwd::cwd() . "/$0";
+ }
+ unshift @INC, $1 if ($0 =~ m=^(/.*)/[^/]+$=);
+}
+use vars qw/$workdir/;
+require "winetest.conf";
+
+
+use POSIX qw(locale_h strftime);
+setlocale(LC_ALL, "C");
+
+sub long_date($)
+{
+ my ($date) = @_;
+ return strftime("%b %d %H:%M:%S", gmtime($date));
+}
+
+
+# generate a table of the errors encountered during processing
+
+chdir($workdir) or die "could not chdir to the work directory: $!";
+
+my @errors;
+
+opendir DIR, "queue" or die "cannot open 'queue'";
+foreach my $dir (readdir DIR)
+{
+ next unless $dir =~ /^err.....$/;
+ open ERR, "queue/$dir/error" or next;
+ my $msg = <ERR>;
+ chomp $msg;
+ my $date = (stat ERR)[9];
+ close ERR;
+ push @errors, { msg => $msg, date => $date, url => "../queue/$dir/report" };
+}
+closedir DIR;
+
+open OUT, ">data/errors.html.new" or die "cannot create 'data/errors.html.new'";
+
+print OUT start_html( -title => "Errors caught during Wine test report processing",
+ -style => {src => "/summary.css"},
+ -encoding => "utf-8" );
+print OUT "<div class=\"main\"><h2>Errors caught during Wine test report processing</h2>\n";
+print OUT "<table class=\"report\"><thead><tr><th class=\"date\">Date</th><th class=\"commitlink\">Error</th></thread>\n";
+
+foreach my $err (sort { $b->{date} <=> $a->{date}; } @errors)
+{
+ printf OUT "<tr><td class=\"date\">%s</td>\n", long_date($err->{date});
+ printf OUT "<td class=\"commitlink\"><a href=\"%s\">%s</a></td></tr>\n", $err->{url}, escapeHTML($err->{msg});
+}
+print OUT "</table>", end_html();
+close OUT;
+
+rename "data/errors.html.new", "data/errors.html" or unlink "data/errors.html.new";
+
+exit 0;
diff --git a/winetest/build-index b/winetest/build-index
index d30fbbb..d301f98 100755
--- a/winetest/build-index
+++ b/winetest/build-index
@@ -69,12 +69,6 @@ sub short_date($)
return strftime("%b %d", gmtime($date));
}
-sub long_date($)
-{
- my ($date) = @_;
- return strftime("%b %d %H:%M:%S", gmtime($date));
-}
-
my %w95 = (name => "Win95");
my %w98 = (name => "Win98");
@@ -335,39 +329,4 @@ close OUT;
rename "data/index.html.new", "data/index.html" or unlink "data/index.html.new";
-# generate a table of the errors encountered during processing
-
-my @errors;
-
-opendir DIR, "queue" or die "cannot open 'queue'";
-foreach my $dir (readdir DIR)
-{
- next unless $dir =~ /^err.....$/;
- open ERR, "queue/$dir/error" or next;
- my $msg = <ERR>;
- chomp $msg;
- my $date = (stat ERR)[9];
- close ERR;
- push @errors, { msg => $msg, date => $date, url => "../queue/$dir/report" };
-}
-closedir DIR;
-
-open OUT, ">data/errors.html.new" or die "cannot create 'data/errors.html.new'";
-
-print OUT start_html( -title => "Errors caught during Wine test report processing",
- -style => {src => "/summary.css"},
- -encoding => "utf-8" );
-print OUT "<div class=\"main\"><h2>Errors caught during Wine test report processing</h2>\n";
-print OUT "<table class=\"report\"><thead><tr><th class=\"date\">Date</th><th class=\"commitlink\">Error</th></thread>\n";
-
-foreach my $err (sort { $b->{date} <=> $a->{date}; } @errors)
-{
- printf OUT "<tr><td class=\"date\">%s</td>\n", long_date($err->{date});
- printf OUT "<td class=\"commitlink\"><a href=\"%s\">%s</a></td></tr>\n", $err->{url}, escapeHTML($err->{msg});
-}
-print OUT "</table>", end_html();
-close OUT;
-
-rename "data/errors.html.new", "data/errors.html" or unlink "data/errors.html.new";
-
exit 0;
diff --git a/winetest/winetest.cron b/winetest/winetest.cron
index 4fbd5a2..45581e2 100755
--- a/winetest/winetest.cron
+++ b/winetest/winetest.cron
@@ -46,6 +46,7 @@ if [ ! -f $lock ]; then
then
mkdir -p data/tests old-data
$tools/build-index
+ $tools/build-errors
fi
# archive old results
Module: tools
Branch: master
Commit: 492fed7e4520da8f9fdd126aabecab493e7c0058
URL: http://source.winehq.org/git/tools.git/?a=commit;h=492fed7e4520da8f9fdd126a…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed May 17 11:23:24 2017 +0200
testbot/WineRunTask: Make the test unit name checks more consistent.
They are now centralized in CheckUnit().
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/WineRunTask.pl | 45 ++++++++++++++++++++++-----------------------
1 file changed, 22 insertions(+), 23 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index f6f6350..5f9d4f3 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -471,6 +471,24 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
# care about the todos and skips
my ($CurrentDll, $CurrentUnit, $LineFailures, $SummaryFailures) = ("", "", 0, 0);
my ($CurrentIsPolluted, %CurrentPids, $LogFailures);
+
+ sub CheckUnit($$)
+ {
+ my ($Unit, $Type) = @_;
+ if ($Unit eq $CurrentUnit)
+ {
+ $IsWineTest = 1;
+ }
+ # To avoid issuing many duplicate errors,
+ # only report the first misplaced message.
+ elsif ($IsWineTest and !$CurrentIsPolluted)
+ {
+ LogTaskError("$CurrentDll:$CurrentUnit contains a misplaced $Type message for $Unit\n");
+ $LogFailures++;
+ $CurrentIsPolluted = 1;
+ }
+ }
+
foreach my $Line (<$LogFile>)
{
if ($Line =~ m%^([_.a-z0-9-]+):([_a-z0-9]*) start (?:-|[/_.a-z0-9]+) (?:-|[.0-9a-f]+)\r?$%)
@@ -487,17 +505,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
($CurrentUnit ne "" and
$Line =~ /($CurrentUnit)\.c:\d+: Test (?:failed|succeeded inside todo block): /))
{
- my $Unit = $1;
- if ($Unit eq $CurrentUnit)
- {
- $IsWineTest = 1;
- }
- else
- {
- # If the failure is not for the current test unit we'll
- # let its developer hash it out with the polluter ;-)
- $CurrentIsPolluted = 1;
- }
+ CheckUnit($1, "failure");
$LineFailures++;
}
elsif ($Line =~ /^Fatal: test '([_a-z0-9]+)' does not exist/)
@@ -520,19 +528,15 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
# This also replaces a test summary line.
$CurrentPids{$Pid || 0} = 1;
$SummaryFailures++;
- $IsWineTest = 1;
- }
- else
- {
- $CurrentIsPolluted = 1;
}
+ CheckUnit($Unit, "unhandled exception");
$LineFailures++;
}
elsif ($Line =~ /^(?:([0-9a-f]+):)?([_a-z0-9]+): \d+ tests? executed \((\d+) marked as todo, (\d+) failures?\), \d+ skipped\./ or
($CurrentUnit ne "" and
$Line =~ /(?:([0-9a-f]+):)?($CurrentUnit): \d+ tests? executed \((\d+) marked as todo, (\d+) failures?\), \d+ skipped\./))
{
- my ($Pid, $Unit, $Todo, $Failures) = ($1, $2, $3, $4);
+ my ($Pid, $Unit, $Todos, $Failures) = ($1, $2, $3, $4);
# Dlls that have only one test unit will run it even if there is
# no argument. Also TestLauncher uses the wrong name in its test
@@ -546,12 +550,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
}
else
{
- $CurrentIsPolluted = 1;
- if ($IsWineTest and ($Todo or $Failures))
- {
- LogTaskError("$CurrentDll:$CurrentUnit contains a misplaced test summary line for $Unit\n");
- $LogFailures++;
- }
+ CheckUnit($Unit, "test summary") if ($Todos or $Failures);
}
}
elsif ($Line =~ /^([_.a-z0-9-]+):([_a-z0-9]*)(?::([0-9a-f]+))? done \((-?\d+)\)(?:\r?$| in)/ or
Module: tools
Branch: master
Commit: 937e1433de9d18413506991e428c5321efa62ed6
URL: http://source.winehq.org/git/tools.git/?a=commit;h=937e1433de9d18413506991e…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed May 17 11:23:13 2017 +0200
testbot/WineRunTask: Tweak matching for the start and done lines.
Allow dll names to contain a dash as we have many such dlls in Wine.
Allow garbage at the start of the done line, since we can use the
current dll name to identify where it starts. But don't allow garbage at
the beginning of the start line as it could interfere with the proper
detection of the dll name.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/WineRunTask.pl | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 8b9afab..f6f6350 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -473,7 +473,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
my ($CurrentIsPolluted, %CurrentPids, $LogFailures);
foreach my $Line (<$LogFile>)
{
- if ($Line =~ m%([_.a-z0-9]+):([_a-z0-9]*) start (?:-|[/_.a-z0-9]+) (?:-|[.0-9a-f]+)\r?$%)
+ if ($Line =~ m%^([_.a-z0-9-]+):([_a-z0-9]*) start (?:-|[/_.a-z0-9]+) (?:-|[.0-9a-f]+)\r?$%)
{
my ($Dll, $Unit) = ($1, $2);
if ($CurrentDll ne "")
@@ -554,7 +554,9 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
}
}
}
- elsif ($Line =~ /^([_.a-z0-9]+):([_a-z0-9]*)(?::([0-9a-f]+))? done \((-?\d+)\)(?:\r?$| in)/)
+ elsif ($Line =~ /^([_.a-z0-9-]+):([_a-z0-9]*)(?::([0-9a-f]+))? done \((-?\d+)\)(?:\r?$| in)/ or
+ ($CurrentDll ne "" and
+ $Line =~ /(\Q$CurrentDll\E):([_a-z0-9]*)(?::([0-9a-f]+))? done \((-?\d+)\)(?:\r?$| in)/))
{
my ($Dll, $Unit, $Pid, $Rc) = ($1, $2, $3, $4);