Module: tools Branch: master Commit: 109ed1a6c67d2a0eeb0badb01820807578037bed URL: https://source.winehq.org/git/tools.git/?a=commit;h=109ed1a6c67d2a0eeb0badb0...
Author: Francois Gouget fgouget@codeweavers.com Date: Tue Feb 9 02:27:35 2021 +0100
testbot/reporttest: Add TestWTBS information.
Embed TestWTBS directives and add a --testwtbs option to output the directives instead of the regular report.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/src/reporttest/Makefile | 2 +- testbot/src/reporttest/report.testwtbs | 70 ++++++++++++++++++++++++++++++++++ testbot/src/reporttest/reporttest.c | 18 +++++++-- testbot/src/reporttest/reporttest.rc | 1 + 4 files changed, 87 insertions(+), 4 deletions(-)
diff --git a/testbot/src/reporttest/Makefile b/testbot/src/reporttest/Makefile index f8a927d..152b987 100644 --- a/testbot/src/reporttest/Makefile +++ b/testbot/src/reporttest/Makefile @@ -21,7 +21,7 @@ ReportTest.exe: reporttest.obj reporttest.res .rc.res: $(CROSSWINDRES) -O coff -o $@ $<
-reporttest.res: report.template +reporttest.res: report.template report.testwtbs
clean: rm -f *.obj *.res diff --git a/testbot/src/reporttest/report.testwtbs b/testbot/src/reporttest/report.testwtbs new file mode 100644 index 0000000..49ef2c0 --- /dev/null +++ b/testbot/src/reporttest/report.testwtbs @@ -0,0 +1,70 @@ +The directives below allow checking the results of a ReportTest.exe +TestBot run using TestWTBS. To do so use a command of the form: + + tests/TestWTBS --jobs ID --job-wtbs ID src/reporttest/report.testwtbs + +Where ID is the identifier of the ReportTest.exe job. +See the TestWTBS usage for more information about TestWTBS. + +As an alternative, if the ReportTest source is not available, extract this file +with: + + ReportTest.exe -T >report.testwtbs + + +----- TestWTBS ----- +p tests.TestFailures 40 + +p build.HasTask 0 +a wine.log.GrepV ^Applying patch +a wine.log.GrepV ^Rebuilding the + +g 0 tests.report.advapi32 +n 0 crypt.c:1: Test failed: Something wrong +n 0 crypt_lmhash.c:10: Test failed: Something wrong +n 0 crypt_lmhash.c:20: Test failed: Second failure with added diacritics: àéïôÿ +n 0 crypt_md5.c:20: Test failed: A failure here, presumably in the subprocess +n 0 crypt_sha.c:20: Test failed: A failure here, presumably in the subprocess +n 0 eventlog.c:20: Test failed: Something wrong +n 0 service.c:20: Test failed: A failure in the subprocess + +g 0 tests.report.advpack +n 0 files.c:20: Test failed: A failure in the main process +n 0 07b0:install: unhandled exception c0000005 at 0040167C + +g 0 tests.report.comctl32 +n 0 animate: Timeout +n 0 comboex.c:40: Test failed: A failure in the main process +n 0 comboex.c:41: Test succeeded inside todo block: Success in the main process +n 0 header.c:1: Test failed: Something wrong +n 0 1234:rebar: unhandled exception c0000005 at 0040167C +n 0 1234:subclass: unhandled exception c0000005 at 0040167C +n 0 Do not cut syslink.c:40: Test failed: Something wrong +n 0 Do not cut syslink.c:41: Test succeeded inside todo block: Something right! +n 0 driver.c:40: Test failed: Something wrong +n 0 driver.c:41: Test succeeded inside todo block: Something right! + +g 0 tests.report.xmllite +n 0 writer.c:20: Test failed: A delayed failure, typically in a subprocess + +g 0 tests.report.Report validation errors +n 0 advapi32:eventlog has unaccounted for failure messages +n 0 advapi32:lsa has no test summary line (early exit of the main process?) +n 0 advapi32:registry has no test summary line (early exit of the main process?) +n 0 advapi32:service returned success despite having failures +n 0 atl:registrar contains a misplaced test summary message for alien +n 0 browseui:progressdlg has unaccounted for skip messages +n 0 cabinet:extract is missing some skip messages +n 0 cmd.exe:batch has unaccounted for todo messages +n 0 comcat:comcat is missing some todo messages +n 0 comctl32:datetime is missing some failure messages +n 0 comctl32:dpa returned a non-zero exit code despite reporting no failures +n 0 comctl32:header returned success despite having failures +n 0 comctl32:ipaddress has no done line (or it is garbled) +n 0 comctl32:misc had no start line (or it is garbled) +n 0 comctl32:monthcal contains a misplaced todo message for security +n 0 comctl32:rebar returned success despite having failures +n 0 comctl32:toolbar has no done line (or it is garbled) +n 0 xmllite:writer has unaccounted for failure messages +n 0 xmllite:writer returned success despite having failures +----- TestWTBS ----- diff --git a/testbot/src/reporttest/reporttest.c b/testbot/src/reporttest/reporttest.c index e1a8a3d..d2364c9 100644 --- a/testbot/src/reporttest/reporttest.c +++ b/testbot/src/reporttest/reporttest.c @@ -44,6 +44,7 @@ static void usage(void) "\n" " -C COMMITID Reports the results for this Git commit id.\n" " -t TAG Reports the results for this tag.\n" + " -T Output the TestWTBS directives instead of the standard report.\n" " --help Print this message and exit.\n" "Other WineTest options are either ignored or not supported.\n" ); @@ -52,6 +53,7 @@ static void usage(void) int main(int argc, char** argv) { char *commitid = NULL, *email = NULL, *logname = NULL, *tag = NULL; + int testwtbs = 0; int i; FILE *logfile; char *report, *eol; @@ -156,6 +158,9 @@ int main(int argc, char** argv) return 2; } break; + case 'T': + testwtbs = 1; + break; case 'x': /* Nothing to do */ return 0; @@ -170,16 +175,16 @@ int main(int argc, char** argv) } }
- report = extract_rcdata("TESTREPORT", "TESTRES", &size); + report = extract_rcdata(testwtbs ? "TESTWTBS" : "TESTREPORT", "TESTRES", &size); if (!report) { - fprintf(stderr, "error: Could not extract the test report (%lu)\n", GetLastError()); + fprintf(stderr, "error: Could not extract the %s (%lu)\n", testwtbs ? "TestWTBS directives" : "test report", GetLastError()); return 1; }
if (logname) { - logfile = fopen(logname, "w"); + logfile = fopen(logname, testwtbs ? "wb" : "w"); if (!logfile) { fprintf(stderr, "error: Could not open '%s' for writing the test: %s\n", logname, strerror(errno)); @@ -211,6 +216,13 @@ int main(int argc, char** argv) line[eol-report] = '\0'; report = eol;
+ if (testwtbs) + { + /* The TestWTBS directives do not require any processing */ + fputs(line, logfile); + continue; + } + /* Empty lines are only there to make the report more editable */ if (*line == '\n') continue;
diff --git a/testbot/src/reporttest/reporttest.rc b/testbot/src/reporttest/reporttest.rc index 7dd0fc8..c252250 100644 --- a/testbot/src/reporttest/reporttest.rc +++ b/testbot/src/reporttest/reporttest.rc @@ -1 +1,2 @@ TESTREPORT TESTRES "report.template" +TESTWTBS TESTRES "report.testwtbs"