summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tests/ecore/ecore_test_timer.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/tests/ecore/ecore_test_timer.c b/src/tests/ecore/ecore_test_timer.c
index 63cb5332d0..6efe5a2554 100644
--- a/src/tests/ecore/ecore_test_timer.c
+++ b/src/tests/ecore/ecore_test_timer.c
@@ -34,6 +34,22 @@ struct _timers // timer struct
34 double precision[3]; 34 double precision[3];
35}; 35};
36 36
37static int
38_efl_test_jenkins_run(void)
39{
40 char *jenkins_url = NULL;
41
42 jenkins_url = getenv("JENKINS_URL");
43
44 if (!jenkins_url)
45 return 0;
46
47 if (strcmp(jenkins_url, "https://build.enlightenment.org/") == 0)
48 return 1;
49 else
50 return 0;
51}
52
37static Eina_Bool 53static Eina_Bool
38_timer1_cb(void *data) 54_timer1_cb(void *data)
39{ 55{
@@ -182,8 +198,12 @@ _ecore_promise_quit(void *data, const Efl_Event *ev)
182 Eina_Bool *bob = data; 198 Eina_Bool *bob = data;
183 double *start = success->value; 199 double *start = success->value;
184 double delta = ecore_loop_time_get() - *start; 200 double delta = ecore_loop_time_get() - *start;
201 double offset = 0.01;
202
203 if (_efl_test_jenkins_run())
204 offset *= 5;
185 205
186 ck_assert_msg(delta - 0.2 <= 0.02, "Ecore promise timeout took %f (should be <= 0.02)\n", delta - 0.2); 206 ck_assert_msg(delta - 0.2 <= offset, "Ecore promise timeout took %f (should be <= %f)\n", delta - 0.2, offset);
187 207
188 *bob = EINA_TRUE; 208 *bob = EINA_TRUE;
189 ecore_main_loop_quit(); 209 ecore_main_loop_quit();