e-tizen-unittests: disable gesture tests if the profile is tv 84/264284/1
authorJunseok, Kim <juns.kim@samsung.com>
Wed, 15 Sep 2021 11:31:46 +0000 (20:31 +0900)
committerJunseok, Kim <juns.kim@samsung.com>
Wed, 15 Sep 2021 11:31:46 +0000 (20:31 +0900)
Change-Id: I60e19cc154fdea670008b6452de7419b6006613e

packaging/e-tizen-unittests.spec
src/e_test_event.cpp
src/e_test_event.h
src/testcase/0009_input.cpp

index f5dedad..cf54832 100644 (file)
@@ -42,6 +42,9 @@ export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib"
 %if "%{USE_GCOV}" == "1"
 export CXXFLAGS+=" -DTIZEN_TEST_GCOV "
 %endif
+%if "%{tizen_profile_name}" == "tv"
+export CXXFLAGS+=" -DDISABLE_GESTURE_TESTS "
+%endif
 
 %autogen
 %configure --prefix=/usr
index 40f6241..90abc0b 100644 (file)
@@ -134,9 +134,11 @@ static void _cb_evas_smart_cb_launch_done(void *data, Evas_Object * obj, void *e
 static Eina_Bool _cb_work_timeout(void *data);
 
 /* callbacks - gesture */
+#ifndef DISABLE_GESTURE_TESTS
 static Eina_Bool _cb_gesture_tap(void *data, int type, void *event);
 static Eina_Bool _cb_gesture_edge_swipe(void *data, int type, void *event);
 static Eina_Bool _cb_gesture_edge_drag(void *data, int type, void *event);
+#endif
 
 /**********************
       listeners
@@ -210,8 +212,10 @@ etRunner::init()
    EINA_SAFETY_ON_NULL_RETURN_VAL(inputGenerator, EINA_FALSE);
 
    // init gesture handler
+ #ifndef DISABLE_GESTURE_TESTS
    gestureHandler = efl_util_gesture_initialize();
    EINA_SAFETY_ON_NULL_RETURN_VAL(gestureHandler, EINA_FALSE);
+ #endif
 
    // add signal handlers
    res = addSignalHandlers();
@@ -304,7 +308,9 @@ etRunner::shutdown()
    efl_util_input_deinitialize_generator(inputGenerator);
 
    // deinit gesture handler
+#ifndef DISABLE_GESTURE_TESTS
    efl_util_gesture_deinitialize(gestureHandler);
+#endif
 }
 
 Eina_Bool
@@ -1629,6 +1635,7 @@ etRunner::addSignalHandlers()
    EINA_SAFETY_ON_NULL_GOTO(eh, err);
    ev.eh_list = eina_list_append(ev.eh_list, eh);
 
+#ifndef DISABLE_GESTURE_TESTS
    eh = ecore_event_handler_add(EFL_UTIL_EVENT_GESTURE_TAP, _cb_gesture_tap, this);
    EINA_SAFETY_ON_NULL_GOTO(eh, err);
    ev.eh_list = eina_list_append(ev.eh_list, eh);
@@ -1640,6 +1647,7 @@ etRunner::addSignalHandlers()
    eh = ecore_event_handler_add(EFL_UTIL_EVENT_GESTURE_EDGE_DRAG, _cb_gesture_edge_drag, this);
    EINA_SAFETY_ON_NULL_GOTO(eh, err);
    ev.eh_list = eina_list_append(ev.eh_list, eh);
+#endif
 
    ev.key.ecore_state = EINA_FALSE;
 
@@ -2518,6 +2526,7 @@ _cb_evas_smart_cb_launch_done(void *data, Evas_Object * obj, void *event_info)
      }
 }
 
+#ifndef DISABLE_GESTURE_TESTS
 static Eina_Bool
 _cb_gesture_tap(void *data, int type, void *event)
 {
@@ -2838,6 +2847,7 @@ etRunner::generateEdgeDragGesture()
 
    return EINA_TRUE;
 }
+#endif
 
 void
 _verifyTCGetBufferSize(tbm_surface_h buffer, int *buffer_w, int *buffer_h, int *stride)
index 8ca7884..e2193c0 100644 (file)
@@ -223,6 +223,7 @@ public: /* TODO: make it hidden */
              unsigned int state_smcb;
              unsigned int type;
           } effect;
+#ifndef DISABLE_GESTURE_TESTS
         struct
           {
              Ecore_Timer *timer;
@@ -241,6 +242,7 @@ public: /* TODO: make it hidden */
                   Eina_Bool get_event;
                } edge;
           } gesture;
+#endif
      } ev;
    struct
      {
@@ -312,9 +314,11 @@ public:
    Eina_Bool     generateTouchDown(int idx, int x, int y);
    Eina_Bool     generateTouchMove(int idx, int x, int y);
    Eina_Bool     generateTouchUp(int idx, int x, int y);
+#ifndef DISABLE_GESTURE_TESTS
    Eina_Bool     generateTapGesture();
    Eina_Bool     generateEdgeSwipeGesture();
    Eina_Bool     generateEdgeDragGesture();
+#endif
    Eina_Bool     setSplashLaunch(const char *path, int type);
    Eina_Bool     setSplashOwner();
    Eina_Bool     setWinEffect(etWin *tw);
@@ -337,7 +341,9 @@ public:
    Eldbus_Proxy  *getDbusProxy()  { return dbus.ds_proxy; }
    Eldbus_Object *getDbusObject() { return dbus.ds_obj;   }
    int            getLogDomain()  { return logDomain;  }
+#ifndef DISABLE_GESTURE_TESTS
    efl_util_gesture_h getGestureHandler() { return gestureHandler; }
+#endif
 
    Eina_Bool     verifyTC(std::string basetype, std::string tcname);
    void          parseTargetInfo(int argc, char **argv);
@@ -345,7 +351,9 @@ public:
 protected:
    Eina_Bool initProtocols();
    efl_util_inputgen_h inputGenerator = NULL;
+#ifndef DISABLE_GESTURE_TESTS
    efl_util_gesture_h gestureHandler = NULL;
+#endif
    efl_util_screenshot_h screenshot = NULL;
 };
 
index 870dd27..d376fe0 100644 (file)
@@ -19,16 +19,19 @@ public:
         eina_stringshare_del(etRunner::get().ev.key.name);
         key_name = NULL;
      };
-
+#ifndef DISABLE_GESTURE_TESTS
    void test_gesture_edge_swipe(int fingers, efl_util_gesture_edge_e edge);
    void test_gesture_edge_drag(int fingers, efl_util_gesture_edge_e edge);
+#endif
 
 protected:
    etWin *tw_shared = NULL;
    etWin *tw_topposition = NULL;
    etWin *tw_orexcl = NULL;
    etWin *tw_excl = NULL;
+#ifndef DISABLE_GESTURE_TESTS
    etWin *tw_gesture = NULL;
+#endif
    std::string testCaseName;
    std::string testName;
 
@@ -331,7 +334,7 @@ TEST_F(etTestInput, keygrab_win)
 
    ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
 }
-
+#ifndef DISABLE_GESTURE_TESTS
 TEST_F(etTestInput, gesture_tap22)
 {
    int ret = EFL_UTIL_ERROR_NONE;
@@ -574,3 +577,4 @@ TEST_F(etTestInput, gesture_edge_drag24)
 
    ASSERT_EQ(etRunner::get().verifyTC(testCaseName, testName), EINA_TRUE);
 }
+#endif
\ No newline at end of file