forked from enlightenment/efl
tests: add test for check < 0.11 to enable timing info
This commit is contained in:
parent
568fc2ab30
commit
71f76c65cf
|
@ -27,6 +27,12 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_GETTIMEOFDAY
|
||||||
|
# if CHECK_MINOR_VERSION >= 11
|
||||||
|
# define ENABLE_TIMING_INFO
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _Efl_Test_Case Efl_Test_Case;
|
typedef struct _Efl_Test_Case Efl_Test_Case;
|
||||||
struct _Efl_Test_Case
|
struct _Efl_Test_Case
|
||||||
{
|
{
|
||||||
|
@ -123,7 +129,7 @@ _efl_test_fork_has(SRunner *sr)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_GETTIMEOFDAY
|
#ifdef ENABLE_TIMING_INFO
|
||||||
EINA_UNUSED static double _timing_start_time;
|
EINA_UNUSED static double _timing_start_time;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -198,7 +204,7 @@ _efl_suite_build_and_run(int argc, const char **argv, const char *suite_name, co
|
||||||
SRunner *sr;
|
SRunner *sr;
|
||||||
TCase *tc;
|
TCase *tc;
|
||||||
int i, failed_count;
|
int i, failed_count;
|
||||||
#ifdef HAVE_GETTIMEOFDAY
|
#ifdef ENABLE_TIMING_INFO
|
||||||
double tstart;
|
double tstart;
|
||||||
int timing = _timing_enabled();
|
int timing = _timing_enabled();
|
||||||
|
|
||||||
|
@ -228,7 +234,7 @@ _efl_suite_build_and_run(int argc, const char **argv, const char *suite_name, co
|
||||||
srunner_run_all(sr, CK_ENV);
|
srunner_run_all(sr, CK_ENV);
|
||||||
failed_count = srunner_ntests_failed(sr);
|
failed_count = srunner_ntests_failed(sr);
|
||||||
srunner_free(sr);
|
srunner_free(sr);
|
||||||
#ifdef HAVE_GETTIMEOFDAY
|
#ifdef ENABLE_TIMING_INFO
|
||||||
if (timing)
|
if (timing)
|
||||||
printf("SUITE TIME %s: %.5g\n", suite_name, _timing_time_get() - tstart);
|
printf("SUITE TIME %s: %.5g\n", suite_name, _timing_time_get() - tstart);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue