Module: tools
Branch: master
Commit: 940461b370e3dbc8631bcb07d112cefd6006cfa8
URL: http://source.winehq.org/git/tools.git/?a=commit;h=940461b370e3dbc8631bcb07…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Mar 24 03:40:48 2017 +0100
testbot/WineRunTask: Better handle non-Wine tests.
Wine developpers can upload executables instead of Wine patches. These
need not follow or use the Wine test framework. So relax the checks for
them.
Also detect proper Wine test executables based on telltale signs in
their traces.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/WineRunTask.pl | 40 +++++++++++++++++++++++++++++++---------
1 file changed, 31 insertions(+), 9 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index d364777..7357c06 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -358,6 +358,7 @@ if ($Step->ReportSuccessfulTests)
{
$Script .= "set WINETEST_REPORT_SUCCESS=1\r\n";
}
+my $IsWineTest = 1;
if ($Step->Type eq "single")
{
my $TestLauncher = "TestLauncher" . ($FileType eq "exe64" ? "64" : "32") . ".exe";
@@ -378,6 +379,10 @@ if ($Step->Type eq "single")
$Script .= "$CmdLineArg ";
}
$Script .= "> $RptFileName\r\n";
+
+ # If StepNo is 1 then the user gave us an executable. Then there is no
+ # telling if it's going to follow the Wine test standards.
+ $IsWineTest = ($StepNo != 1);
}
elsif ($Step->Type eq "suite")
{
@@ -482,10 +487,17 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
($CurrentUnit ne "" and
$Line =~ /($CurrentUnit)\.c:\d+: Test failed: /))
{
- # If the failure is not for the current test unit we'll let its
- # developer hash it out with the polluter ;-)
- $CurrentIsPolluted = 1 if ($1 ne $CurrentUnit);
-
+ 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;
+ }
$LineFailures++;
}
elsif ($Line =~ /^Fatal: test '([_a-z0-9]+)' does not exist/)
@@ -493,6 +505,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
# This also replaces a test summary line.
$CurrentPids{0} = 1;
$SummaryFailures++;
+ $IsWineTest = 1;
$LineFailures++;
}
@@ -507,6 +520,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
# This also replaces a test summary line.
$CurrentPids{$Pid || 0} = 1;
$SummaryFailures++;
+ $IsWineTest = 1;
}
else
{
@@ -528,11 +542,12 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
# There may be more than one summary line due to child processes
$CurrentPids{$Pid || 0} = 1;
$SummaryFailures += $Failures;
+ $IsWineTest = 1;
}
else
{
$CurrentIsPolluted = 1;
- if ($Todo or $Failures)
+ if ($IsWineTest and ($Todo or $Failures))
{
LogTaskError("Found a misplaced '$Unit' test summary line.\n");
$LogFailures++;
@@ -543,7 +558,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
{
my ($Dll, $Unit, $Pid, $Rc) = ($1, $2, $3, $4);
- if ($Dll ne $CurrentDll or $Unit ne $CurrentUnit)
+ if ($IsWineTest and ($Dll ne $CurrentDll or $Unit ne $CurrentUnit))
{
LogTaskError("The start line is missing for $Dll:$Unit\n");
$LogFailures++;
@@ -582,6 +597,11 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
# done line.
$LogFailures++;
}
+ elsif (!$IsWineTest and $Rc != 0)
+ {
+ LogTaskError("The test returned a non-zero exit code\n");
+ $LogFailures++;
+ }
elsif ($LineFailures == 0 and $Rc != 0)
{
LogTaskError("$Dll:$Unit returned an error ($Rc) despite having no failures\n");
@@ -589,7 +609,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
}
}
- if ($Rc != 258 and
+ if ($IsWineTest and $Rc != 258 and
((!$Pid and !%CurrentPids) or
($Pid and !$CurrentPids{$Pid} and !$CurrentPids{0})))
{
@@ -606,9 +626,11 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
}
close($LogFile);
- if ($TimedOut)
+ if (!$IsWineTest or $TimedOut)
{
- # The report got truncated due to the timeout so ignore the other checks
+ # This is either not a Wine test, which means the report need not follow
+ # the Wine test standards, or the report got truncated due to the
+ # timeout. In either case ignore the other checks.
}
elsif (!defined $LogFailures)
{
Module: tools
Branch: master
Commit: 402dcab3f8717e126cff1ee845bf4483d8b50116
URL: http://source.winehq.org/git/tools.git/?a=commit;h=402dcab3f8717e126cff1ee8…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Mar 24 03:31:07 2017 +0100
winetest: Tweak winetest.cron so modifying it is not necessary.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
winetest/INSTALL.txt | 13 +++----------
winetest/winetest.cron | 17 ++++++++++++++---
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/winetest/INSTALL.txt b/winetest/INSTALL.txt
index a0bf6de..4d18490 100644
--- a/winetest/INSTALL.txt
+++ b/winetest/INSTALL.txt
@@ -86,17 +86,10 @@ FIXME The site script looks like it's meant to redirect from / to
The web site is essentially composed of static web pages that are
refreshed by perl scripts that are run at regular intervals.
-The script that orchestrates this is winetest.cron and it needs to be
-modified so it knows where the tools and workdir directories are
-located. Typically this would be:
+The script that orchestrates this is winetest.cron so set up a cron job
+in the winehq account to periodically update the pages:
- tools=/home/wine/tools/winetest
- workdir=/home/winehq/sites/winetest
-
-Then set up a cron job in the winehq account to periodically update
-the pages:
-
- */5 * * * * /home/wine/tools/winetest/winetest.cron
+ */5 * * * * /home/wine/tools/winetest/winetest.cron /home/winehq/sites/winetest
Still in the winehq account, you should run winetest.cron at least once
before accessing the web site so the initial set of web pages has been
diff --git a/winetest/winetest.cron b/winetest/winetest.cron
index 4b60d10..4fbd5a2 100755
--- a/winetest/winetest.cron
+++ b/winetest/winetest.cron
@@ -15,10 +15,21 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Cron job for generating winetest reports. Use it like
-# */5 * * * * apache winetest.cron
+# */5 * * * * winetest.cron WORKDIR
-tools=/home/winehq/opt/tools/winetest
-workdir=/home/winehq/opt/winetest
+name0=`basename "$0"`
+tools=`dirname "$0"`
+case "$tools" in
+ /*) ;; # Nothing to do
+ *) tools=`pwd`/"$tools" ;;
+esac
+
+workdir="$1"
+if [ -z "$workdir" ]
+then
+ echo "$name0:error: you must specify the work directory as the first parameter" >&2
+ exit 1
+fi
lock=/tmp/winetest.lock
# expiration age (in days) before results get archived
Module: tools
Branch: master
Commit: 89cfa0482cb88617a4b044d678b1b311cf55cbaf
URL: http://source.winehq.org/git/tools.git/?a=commit;h=89cfa0482cb88617a4b044d6…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Mar 24 03:28:22 2017 +0100
testbot/reporttest: Fix duplicated source paths.
The winetest website shows the source path as the title for the test so
duplicates are confusing.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/src/reporttest/report.template | 6 +++---
testbot/src/reporttest/reporttest.c | 7 ++++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/testbot/src/reporttest/report.template b/testbot/src/reporttest/report.template
index cb83ad7..d66b829 100644
--- a/testbot/src/reporttest/report.template
+++ b/testbot/src/reporttest/report.template
@@ -262,7 +262,7 @@ eventlog.c:20: Test failed: Something wrong
088c:eventlog: 408 tests executed (0 marked as todo, 0 failures), 0 skipped.
advapi32:eventlog:088c done (3) in 4s
-advapi32:lsa start dlls/advapi32/tests/crypt.c -
+advapi32:lsa start dlls/advapi32/tests/lsa.c -
----- A unit test with no test summary line
----- Expected assessement: "Missing test summary" error
advapi32:lsa:083c done (0) in 0s
@@ -299,7 +299,7 @@ advpack:advpack start dlls/advpack/tests/advpack.c -
0da0:advpack: 99 tests executed (0 marked as todo, 0 failures), 0 skipped.
advpack:advpack:0da0 done (0) in 0s
-advpack:files start dlls/advapi32/tests/crypt.c -
+advpack:files start dlls/advpack/tests/files.c -
----- A unit test with a failed test in the main process
----- Expected assessement: 1 failure
files.c:20: Test failed: A failure in the main process
@@ -1020,7 +1020,7 @@ stub xcopy.exe:xcopy
stub xmllite:reader
stub xmllite:writer
-xmllite:writer start fake/source/writer.c -
+xmllite:writer start dlls/xmllite/tests/writer.c -
----- A unit test with a misplaced test failed line
----- Expected assessement: "Misplaced test failed line" error
See the similar scenario before but note the lack of the extra test summary line
diff --git a/testbot/src/reporttest/reporttest.c b/testbot/src/reporttest/reporttest.c
index 122f90e..fecaa50 100644
--- a/testbot/src/reporttest/reporttest.c
+++ b/testbot/src/reporttest/reporttest.c
@@ -236,13 +236,14 @@ int main(int argc, char** argv)
fputs(line, stdout);
return 1;
}
+ *unit = '\0';
unit++;
- line[strlen(line)-1] = '\0';
- fprintf(logfile, "%s start fake/source/%s.c -\n", line+5, unit);
+ unit[strlen(unit)-1] = '\0';
+ fprintf(logfile, "%s:%s start fake/%s/%s.c -\n", line+5, unit, line+5, unit);
fprintf(logfile, "----- A standard successful unit test\n");
fprintf(logfile, "----- Expected assessement: Success\n");
fprintf(logfile, "1234:%s: 2 tests executed (0 marked as todo, 0 failures), 0 skipped.\n", unit);
- fprintf(logfile, "%s:1234 done (0) in 0s\n", line+5);
+ fprintf(logfile, "%s:%s:1234 done (0) in 0s\n", line+5, unit);
}
else
{