utest: fix all failed tests and add new tests
[platform/core/uifw/libtdm.git] / utests / src / ut_tdm_helper.cpp
index 96607a2..0acd225 100644 (file)
@@ -15,7 +15,7 @@ extern "C" {
 #include "tbm_drm_helper.h"
 }
 
-#define TMP_PATH_FOR_UTEST "tmp_utest_helper"
+#define TMP_PATH_FOR_UTEST "/tmp/tmp_utest_helper"
 #define STR_LEN 8192
 
 class TDMHelper : public ::testing::Test {
@@ -33,7 +33,7 @@ protected:
        {
                setenv("TDM_THREAD", "0", 1);
                setenv("TDM_COMMIT_PER_VBLANK", "1", 1);
-               setenv("XDG_RUNTIME_DIR", ".", 1);
+               setenv("XDG_RUNTIME_DIR", "/run", 1);
                setenv("TBM_DISPLAY_SERVER", "1", 1);
        }
 
@@ -559,8 +559,6 @@ TEST_F(TDMHelperOutput, CaptureOutputFailInvalidInputs)
 
 TEST_F(TDMHelperOutput, CaptureOutputSuccessful)
 {
-       error = tdm_display_get_output_count(dpy, &output_count);
-       ASSERT_EQ(TDM_ERROR_NONE, error);
        for (int i = 0; i < output_count; i++) {
                error = tdm_helper_capture_output(outputs[i], surface, 0, 0, 255, 255, capture_handler, &capture_handler_is_called);
                ASSERT_EQ(TDM_ERROR_NONE, error);