summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-04-09 13:37:03 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-10 11:28:01 +0200
commitb4da776b3b6b0e44c153b159ef8b23554555084b (patch)
tree6c2e0d4ce7afb473151c351e3d4e5d1cdb8908c0
parent1bd52cc1167fc6ce83a845b0d6393e3a9ae60b90 (diff)
tests: add more timing info for per-file timing
Summary: ref T6825 Depends on D5901 Reviewers: stefan_schmidt Subscribers: cedric Maniphest Tasks: T6825 Differential Revision: https://phab.enlightenment.org/D5902
-rw-r--r--src/tests/efl_check.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tests/efl_check.h b/src/tests/efl_check.h
index 8474a7b64e..3231b0d54e 100644
--- a/src/tests/efl_check.h
+++ b/src/tests/efl_check.h
@@ -246,11 +246,11 @@ _efl_suite_build_and_run(int argc, const char **argv, const char *suite_name, co
246 int num_forks = 0; 246 int num_forks = 0;
247 int can_fork = 0; 247 int can_fork = 0;
248#ifdef ENABLE_TIMING_INFO 248#ifdef ENABLE_TIMING_INFO
249 double tstart; 249 double tstart, tcstart;
250 int timing = strcmp(suite_name, "eina_init_module") && _timing_enabled(); 250 int timing = strcmp(suite_name, "eina_init_module") && _timing_enabled();
251 251
252 if (timing) 252 if (timing)
253 tstart = _timing_time_get(); 253 tcstart = tstart = _timing_time_get();
254#endif 254#endif
255 s = suite_create(suite_name); 255 s = suite_create(suite_name);
256 sr = srunner_create(s); 256 sr = srunner_create(s);
@@ -271,6 +271,8 @@ _efl_suite_build_and_run(int argc, const char **argv, const char *suite_name, co
271 if (pid > 0) 271 if (pid > 0)
272 { 272 {
273 num_forks++; 273 num_forks++;
274 if (timing)
275 tcstart = _timing_time_get();
274 continue; 276 continue;
275 } 277 }
276 } 278 }
@@ -291,6 +293,10 @@ _efl_suite_build_and_run(int argc, const char **argv, const char *suite_name, co
291 failed_count = _efl_suite_run_end(sr, etc[i].test_case); 293 failed_count = _efl_suite_run_end(sr, etc[i].test_case);
292 if (failed_count > 255) 294 if (failed_count > 255)
293 failed_count = 255; 295 failed_count = 255;
296#ifdef ENABLE_TIMING_INFO
297 if (timing)
298 printf("TC TIME %s: %.5g\n", etc[i].test_case, _timing_time_get() - tcstart);
299#endif
294 exit(failed_count); 300 exit(failed_count);
295 } 301 }
296#endif 302#endif