summaryrefslogtreecommitdiff
path: root/src/tests/elementary/suite_helpers.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-05-28 12:01:57 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-28 12:01:57 -0400
commit8721caf787ce1a9abb6198f41bfc1a033d4f799a (patch)
tree2ec813d4f045cfa658302385d4baa36f3f114a43 /src/tests/elementary/suite_helpers.c
parent52b2701bc3bfb64a3f6ca4ce0b992ac83d7c9e73 (diff)
efl_ui: add a helper for not tollerating errors in a testsuite
Summary: We now also fail in the focus tests Depends on D9021 Reviewers: zmike, cedric, segfaultxavi Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9022
Diffstat (limited to 'src/tests/elementary/suite_helpers.c')
-rw-r--r--src/tests/elementary/suite_helpers.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/elementary/suite_helpers.c b/src/tests/elementary/suite_helpers.c
index a57ae493fa..e5d43c38b9 100644
--- a/src/tests/elementary/suite_helpers.c
+++ b/src/tests/elementary/suite_helpers.c
@@ -16,6 +16,8 @@ static Eina_Bool did_shutdown;
16static Evas_Object *global_win; 16static Evas_Object *global_win;
17static Eina_Bool buffer = EINA_FALSE; 17static Eina_Bool buffer = EINA_FALSE;
18static Eina_Bool legacy_mode = EINA_FALSE; 18static Eina_Bool legacy_mode = EINA_FALSE;
19static int log_abort;
20static int log_abort_level;
19 21
20void elm_test_init(TCase *tc); 22void elm_test_init(TCase *tc);
21 23
@@ -340,3 +342,19 @@ suite_setup(Eina_Bool legacy)
340 } 342 }
341 return 0; 343 return 0;
342} 344}
345
346void
347fail_on_errors_teardown(void)
348{
349 eina_log_abort_on_critical_set(log_abort);
350 eina_log_abort_on_critical_level_set(log_abort_level);
351}
352
353void
354fail_on_errors_setup(void)
355{
356 log_abort = eina_log_abort_on_critical_get();
357 log_abort_level = eina_log_abort_on_critical_level_get();
358 eina_log_abort_on_critical_level_set(2);
359 eina_log_abort_on_critical_set(1);
360}