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

This commit is contained in:
Francois Gouget 2013-02-15 11:16:49 +01:00 committed by Alexandre Julliard
parent fb29bf7d2f
commit f704803c96
1 changed files with 2 additions and 1 deletions

View File

@ -724,12 +724,13 @@ run_test (struct wine_test* test, const char* subtest, HANDLE out_file, const ch
else else
{ {
int status; int status;
DWORD start = GetTickCount();
char *cmd = strmake (NULL, "%s %s", test->exename, subtest); char *cmd = strmake (NULL, "%s %s", test->exename, subtest);
report (R_STEP, "Running: %s:%s", test->name, subtest); report (R_STEP, "Running: %s:%s", test->name, subtest);
xprintf ("%s:%s start %s -\n", test->name, subtest, file); xprintf ("%s:%s start %s -\n", test->name, subtest, file);
status = run_ex (cmd, out_file, tempdir, 120000); status = run_ex (cmd, out_file, tempdir, 120000);
heap_free (cmd); 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 (status) failures++;
} }
if (failures) report (R_STATUS, "Running tests - %u failures", failures); if (failures) report (R_STATUS, "Running tests - %u failures", failures);