devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=21bba131c8697b1b1f07ce8ff039bbf1ac65519a
commit 21bba131c8697b1b1f07ce8ff039bbf1ac65519a Author: Mike Blumenkrantz <[email protected]> Date: Wed Jun 27 06:17:45 2018 -0400 tests: avoid cascading failure in ecore-imf tests when not forking Summary: these tests explicitly call ecore_imf_init, so they must call ecore_imf_shutdown even on failure cases to avoid propagating their failure to subsequent tests ref T7085 Reviewers: ManMower, bu5hm4n, devilhorns Reviewed By: devilhorns Subscribers: cedric, #committers Tags: #efl Maniphest Tasks: T7085 Differential Revision: https://phab.enlightenment.org/D6433 --- src/tests/ecore/ecore_test_ecore_imf.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/tests/ecore/ecore_test_ecore_imf.c b/src/tests/ecore/ecore_test_ecore_imf.c index 2f6b092f44..e4671597f5 100644 --- a/src/tests/ecore/ecore_test_ecore_imf.c +++ b/src/tests/ecore/ecore_test_ecore_imf.c @@ -51,6 +51,7 @@ EFL_START_TEST(ecore_test_ecore_imf_modules) { Eina_List *modules; const char **itr; + char *failure = NULL; putenv("ECORE_IMF_MODULE="); ecore_imf_init(); @@ -59,18 +60,20 @@ EFL_START_TEST(ecore_test_ecore_imf_modules) for (itr = built_modules; *itr != NULL; itr++) { Eina_Bool found = _find_list(modules, *itr); - fail_if(!found, "imf module should be built, but was not found: %s", - *itr); + if (!found) failure = eina_strdup(*itr); + if (failure) break; } eina_list_free(modules); ecore_imf_shutdown(); + ck_assert_msg(!failure, "compiled imf module not found: %s", failure); } EFL_END_TEST EFL_START_TEST(ecore_test_ecore_imf_modules_load) { const char **itr; + char *failure = NULL; putenv("ECORE_IMF_MODULE="); ecore_imf_init(); @@ -84,11 +87,16 @@ EFL_START_TEST(ecore_test_ecore_imf_modules_load) } ctx = ecore_imf_context_add(*itr); - fail_if(ctx == NULL, "could not add imf context: %s", *itr); + if (!ctx) + { + failure = eina_strdup(*itr); + break; + } ecore_imf_context_del(ctx); } ecore_imf_shutdown(); + ck_assert_msg(!failure, "could not add imf context: %s", failure); } EFL_END_TEST --
