From: Mike Blumenkrantz Date: Tue, 27 Mar 2018 19:14:11 +0000 (-0400) Subject: tests: disable xim in ecore_imf test when DISPLAY is not set X-Git-Tag: upstream/1.21.0~1474 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a734b9e26d65efb5c0f47ee6b2331573e92f880;p=platform%2Fupstream%2Fefl.git tests: disable xim in ecore_imf test when DISPLAY is not set tests should be able to run in console without failing Reviewed-by: Stefan Schmidt --- diff --git a/src/tests/ecore/ecore_test_ecore_imf.c b/src/tests/ecore/ecore_test_ecore_imf.c index 3a1136b..2f6b092 100644 --- a/src/tests/ecore/ecore_test_ecore_imf.c +++ b/src/tests/ecore/ecore_test_ecore_imf.c @@ -34,6 +34,11 @@ _find_list(const Eina_List *lst, const char *item) { const Eina_List *n; const char *s; + + if (eina_streq(item, "xim")) + { + if (!getenv("DISPLAY")) return EINA_TRUE; + } EINA_LIST_FOREACH(lst, n, s) { if (strcmp(s, item) == 0) @@ -71,7 +76,14 @@ EFL_START_TEST(ecore_test_ecore_imf_modules_load) ecore_imf_init(); for (itr = built_modules; *itr != NULL; itr++) { - Ecore_IMF_Context *ctx = ecore_imf_context_add(*itr); + Ecore_IMF_Context *ctx; + + if (eina_streq(*itr, "xim")) + { + if (!getenv("DISPLAY")) continue; + } + + ctx = ecore_imf_context_add(*itr); fail_if(ctx == NULL, "could not add imf context: %s", *itr); ecore_imf_context_del(ctx); }