winetest: Trace the time it takes to run each test.

Francois Gouget fgouget at
Fri Feb 15 04:16:49 CST 2013


The result lines will be of the form:

   advapi32:service done (3) in 27s

So one will be able to have a look at the results collected on to see if there are tests that are routinely getting 
dangerously close to the 120s timeout.

 programs/winetest/main.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index f4fe23c..0e7abaf 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -724,12 +724,13 @@ run_test (struct wine_test* test, const char* subtest, HANDLE out_file, const ch
         int status;
+        DWORD start = GetTickCount();
         char *cmd = strmake (NULL, "%s %s", test->exename, subtest);
         report (R_STEP, "Running: %s:%s", test->name, subtest);
         xprintf ("%s:%s start %s -\n", test->name, subtest, file);
         status = run_ex (cmd, out_file, tempdir, 120000);
         heap_free (cmd);
-        xprintf ("%s:%s done (%d)\n", test->name, subtest, status);
+        xprintf ("%s:%s done (%d) in %ds\n", test->name, subtest, status, (GetTickCount()-start)/1000);
         if (status) failures++;
     if (failures) report (R_STATUS, "Running tests - %u failures", failures);

More information about the wine-patches mailing list