aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-06-27 06:17:45 -0400
committerChris Michael <cp.michael@samsung.com>2018-06-27 06:17:45 -0400
commit21bba131c8697b1b1f07ce8ff039bbf1ac65519a (patch)
tree3fbf340ae5e57bf53f41f38541f3ea3c87fbb1a7
parenteina debug - fix setuid process shutdown by initting fully except conn (diff)
downloadefl-21bba131c8697b1b1f07ce8ff039bbf1ac65519a.tar.gz
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 https://phab.enlightenment.org/T7085 Reviewers: ManMower, bu5hm4n, devilhorns Reviewed By: devilhorns Subscribers: cedric, #committers Tags: #efl Maniphest Tasks: https://phab.enlightenment.org/T7085 Differential Revision: https://phab.enlightenment.org/D6433
-rw-r--r--src/tests/ecore/ecore_test_ecore_imf.c14
1 files 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