utests: use TDM_CONFIG_KEY_DEBUG_DUMP to dump all tc's buffer
[platform/core/uifw/libtdm.git] / utests / src / ut_tdm_env.cpp
index a590b68..25915aa 100644 (file)
@@ -62,6 +62,10 @@ void TDMEnv::SetUp(void)
        const char *debug = getenv("TDM_UT_DEBUG_MODULE");
        if (debug && strstr(debug, "1"))
                tdm_config_set_string(TDM_CONFIG_KEY_DEBUG_MODULE, "buffer,vblank,commit,pp,capture");
+
+       debug = getenv("TDM_UT_DEBUG_DUMP");
+       if (debug && (debug[0] == '1'))
+               tdm_config_set_string(TDM_CONFIG_KEY_DEBUG_DUMP, "all");
 }
 
 void TDMEnv::TearDown(void)
@@ -134,47 +138,11 @@ TEST_P(TDMEnv, DisplayInitDeinitWithoutBackends)
 {
 }
 
-TEST_P(TDMEnv, DisplayInitDeinitWrongDpyBadAddress)
-{
-       tdm_display *dpy;
-       tdm_error ret;
-
-       dpy = tdm_display_init(&ret);
-       ASSERT_EQ(ret, TDM_ERROR_NONE);
-       ASSERT_NE(dpy, NULL);
-
-       EXPECT_EXIT({
-               tdm_display *wrong_dpy = (tdm_display *)TDM_UT_INVALID_VALUE;
-               tdm_display_deinit(wrong_dpy);
-               exit(0);
-       }, ::testing::ExitedWithCode(0), "");
-
-       tdm_display_deinit(dpy);
-}
-
 TEST_P(TDMEnv, DisplayDeinitWithNULL)
 {
        tdm_display_deinit(NULL);
 }
 
-TEST_P(TDMEnv, DisplayDeinitRepeatWithSameDpy)
-{
-       tdm_display *dpy;
-       tdm_error ret;
-
-       dpy = tdm_display_init(&ret);
-       ASSERT_EQ(ret, TDM_ERROR_NONE);
-       ASSERT_NE(dpy, NULL);
-
-       EXPECT_EXIT({
-               tdm_display_deinit(dpy);
-               tdm_display_deinit(dpy);
-               exit(0);
-       }, ::testing::ExitedWithCode(0), "");
-
-       tdm_display_deinit(dpy);
-}
-
 #ifdef TDM_UT_TEST_WITH_PARAMS
 INSTANTIATE_TEST_CASE_P(TDMEnvParams,
                                                TDMEnv,