stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ddd00273a4b01d2f4453eb9ca1aafeaabd08efc1

commit ddd00273a4b01d2f4453eb9ca1aafeaabd08efc1
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Mar 27 15:14:11 2018 -0400

    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 <ste...@osg.samsung.com>
---
 src/tests/ecore/ecore_test_ecore_imf.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/tests/ecore/ecore_test_ecore_imf.c 
b/src/tests/ecore/ecore_test_ecore_imf.c
index 3a1136b6f5..2f6b092f44 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);
      }

-- 


Reply via email to