Fix the generated source file path and automatically select the dlls or programs root directory.
Signed-off-by: Francois Gouget fgouget@codeweavers.com ---
This just fixes the source file path which normally does not matter much in these tests. Still this patch makes stubs perfect so there is no reason to avoid or suspect them anymore.
testbot/src/reporttest/report.template | 1 + testbot/src/reporttest/reporttest.c | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/testbot/src/reporttest/report.template b/testbot/src/reporttest/report.template index 8da3d82a6..0a8f08720 100644 --- a/testbot/src/reporttest/report.template +++ b/testbot/src/reporttest/report.template @@ -210,6 +210,7 @@ Dll info: Test output: stub advapi32:cred ----- WTBS Simple test patch +----- Stubs automatically generate a successful dlls or programs test. ----- Expected assessement: Success
advapi32:crypt start dlls/advapi32/tests/crypt.c - diff --git a/testbot/src/reporttest/reporttest.c b/testbot/src/reporttest/reporttest.c index d2364c94e..67dca248b 100644 --- a/testbot/src/reporttest/reporttest.c +++ b/testbot/src/reporttest/reporttest.c @@ -240,6 +240,9 @@ int main(int argc, char** argv) } else if (strncmp(line, "stub ", 5) == 0) { + char* root; + char* module = line + 5; + int dirlen; char* unit = strchr(line, ':'); if (!unit) { @@ -249,12 +252,22 @@ int main(int argc, char** argv) } *unit = '\0'; unit++; - unit[strlen(unit)-1] = '\0'; - fprintf(logfile, "%s:%s start fake/%s/%s.c -\n", line+5, unit, line+5, unit); + unit[strlen(unit)-1] = '\0'; /* strip the \r */ + + dirlen = strlen(module); + if (strstr(module, ".exe")) + { + dirlen -= 4; + root = "programs"; + } + else + root = strstr(module, ".com") ? "programs" : "dlls"; + + fprintf(logfile, "%s:%s start %s/%.*s/tests/%s.c -\n", module, unit, root, dirlen, module, unit); fprintf(logfile, "----- A standard successful test unit\n"); fprintf(logfile, "----- Expected assessment: Success\n"); fprintf(logfile, "1234:%s: 2 tests executed (0 marked as todo, 0 failures), 0 skipped.\n", unit); - fprintf(logfile, "%s:%s:1234 done (0) in 0s\n", line+5, unit); + fprintf(logfile, "%s:%s:1234 done (0) in 0s\n", module, unit); } else {
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/src/reporttest/report.template | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/testbot/src/reporttest/report.template b/testbot/src/reporttest/report.template index 0a8f08720..3497f3361 100644 --- a/testbot/src/reporttest/report.template +++ b/testbot/src/reporttest/report.template @@ -301,11 +301,8 @@ advapi32:service:037c done (0) in 11s service.c:20: Test failed: A failure in the subprocess 4567:service: 10 tests executed (0 marked as todo, 1 failure), 0 skipped.
-advpack:advpack start dlls/advpack/tests/advpack.c - ------ A standard successful test unit ------ Expected assessement: Success, unless the previous test interferes -0da0:advpack: 99 tests executed (0 marked as todo, 0 failures), 0 skipped. -advpack:advpack:0da0 done (0) in 0s +----- Keep this stub in case the previous test is mishandled +stub advpack:advpack
advpack:files start dlls/advpack/tests/files.c - ----- A test unit with a failed test in the main process before a subprocess @@ -458,11 +455,8 @@ comctl32:monthcal:0148 done (0) in 9s security.c:41: Test marked todo: Hello Wine! 0955:security: 18 tests executed (1 marked as todo, 0 failures), 0 skipped.
-comctl32:mru start dlls/comctl32/tests/mru.c - ------ A standard successful test unit ------ Expected assessement: Success, unless the previous test interferes -0148:mru: 2251 tests executed (0 marked as todo, 0 failures), 0 skipped. -comctl32:mru:0148 done (0) in 9s +----- Keep this stub in case the previous test is mishandled +stub comctl32:mru
comctl32:pager start dlls/comctl32/tests/pager.c - ----- A test unit with a misplaced subprocess skip test summary line @@ -473,11 +467,8 @@ comctl32:pager:0148 done (0) in 9s security.c:42: Tests skipped: Another time 0956:security: 18 tests executed (0 marked as todo, 0 failures), 1 skipped.
-comctl32:progress start dlls/comctl32/tests/progress.c - ------ A standard successful test unit ------ Expected assessement: Success -0148:progress: 2251 tests executed (0 marked as todo, 0 failures), 0 skipped. -comctl32:progress:0148 done (0) in 9s +----- Keep this stub in case the previous test is mishandled +stub comctl32:progress
stub comctl32:propsheet