if (!func_output->output_hwc_create_video_window) {
/* LCOV_EXCL_START */
if (error)
- *error = TDM_ERROR_BAD_MODULE;
+ *error = TDM_ERROR_NOT_IMPLEMENTED;
return NULL;
/* LCOV_EXCL_STOP */
}
#define UT_COMMON_H
#define SKIP_FLAG(FLAG) \
do {\
- if(!FLAG) {\
+ if(!(FLAG)) {\
std::cout << "[ SKIPPED ]" << " not supported" << std::endl;\
return;\
}\
void SetUp(void)
{
setenv("TDM_DLOG", "1", 1);
- setenv("XDG_RUNTIME_DIR", "/tmp", 1);
+ setenv("XDG_RUNTIME_DIR", "/run", 1);
setenv("TBM_DLOG", "1", 1);
setenv("TBM_DISPLAY_SERVER", "1", 1);
}
void SetUp(void)
{
setenv("TDM_DLOG", "1", 1);
- setenv("XDG_RUNTIME_DIR", "/tmp", 1);
+ setenv("XDG_RUNTIME_DIR", "/run", 1);
setenv("TBM_DLOG", "1", 1);
setenv("TBM_DISPLAY_SERVER", "1", 1);
tbm_bufmgr = tbm_bufmgr_init(-1);
dpy = NULL;
}
-TEST_F(TDMInit, DISABLED_DisplayDeinitFailRepeatWithSameDpy)
+TEST_F(TDMInit, DisplayDeinitFailRepeatWithSameDpy)
{
EXPECT_EXIT({tdm_error error = TDM_ERROR_NONE;
tdm_display *dpy = tdm_display_init(&error);
virtual void SetEnvs()
{
setenv("TDM_DLOG", "1", 1);
- setenv("XDG_RUNTIME_DIR", ".", 1);
+ setenv("XDG_RUNTIME_DIR", "/run", 1);
setenv("TBM_DLOG", "1", 1);
setenv("TDM_DEBUG_MODULE", "all", 1);
setenv("TDM_DEBUG", "1", 1);
/* FIXME: fix the error. If we initialize TBM before TDM we get fail
* in the tdm_output_set_dpms */
#if 0
- tbm_bufmgr = tbm_bufmgr_init(-1);
- ASSERT_FALSE(tbm_bufmgr == NULL);
+ bufmgr = tbm_bufmgr_init(-1);
+ ASSERT_FALSE(bufmgr == NULL);
#endif
dpy = tdm_display_init(&error);
int w = output_mode->hdisplay * scale;
int h = output_mode->vdisplay * scale;
+ if (transform == TDM_TRANSFORM_90 || transform == TDM_TRANSFORM_270 ||
+ transform == TDM_TRANSFORM_FLIPPED_90 || transform == TDM_TRANSFORM_FLIPPED_270) {
+ int tmp = w;
+ w = h;
+ h = tmp;
+ }
+
info->dst_config.size.h = w;
info->dst_config.size.v = h;
info->dst_config.pos.x = 0;
void SetUp(void);
void TearDown(void);
void UtHandleCaptureEvent();
+ int UtPrepareToCapture(double scale, tdm_transform transform, tdm_capture_type type);
int UtPrepareToCapture(double scale, tdm_transform transform);
int UtPrepareToCapture();
};
}
}
-int TDMCaptureCommit::UtPrepareToCapture(double scale, tdm_transform transform)
+int TDMCaptureCommit::UtPrepareToCapture(double scale, tdm_transform transform, tdm_capture_type type)
{
tdm_error error;
tbm_surface_h buffer;
tdm_info_capture info = {0};
UtCaptureGetInfo(&utCapture, scale, transform, &info);
+ info.type = type;
error = tdm_capture_set_done_handler(utCapture.capture, UtCaptureDoneHandler, this);
EXPECT_EQ(TDM_ERROR_NONE, error);
return UtPrepareToCapture(1.0, TDM_TRANSFORM_NORMAL);
}
+int TDMCaptureCommit::UtPrepareToCapture(double scale, tdm_transform transform)
+{
+ return UtPrepareToCapture(1.0, TDM_TRANSFORM_NORMAL, TDM_CAPTURE_TYPE_ONESHOT);
+}
+
class TDMCaptureCommitThread : public TDMCaptureCommit {
protected:
void SetEnvs()
ASSERT_EQ(captures.size(), utCaptureDoneHandlerSuccessCounter);
}
+
+TEST_F(TDMCaptureCommit, CaptureCommitSuccessScaleAndTransform90)
+{
+ SKIP_FLAG(has_capture);
+ tdm_error error;
+
+ ASSERT_NE(-1, UtPrepareToCapture(2.0, TDM_TRANSFORM_90));
+
+ for (UtCapture & utCapture : captures) {
+ error = tdm_capture_commit(utCapture.capture);
+ ASSERT_EQ(TDM_ERROR_NONE, error);
+ }
+
+ UtHandleCaptureEvent();
+
+ ASSERT_EQ(captures.size(), utCaptureDoneHandlerSuccessCounter);
+}
+
+TEST_F(TDMCaptureCommit, CaptureCommitSuccessScaleAndTransform270)
+{
+ SKIP_FLAG(has_capture);
+ tdm_error error;
+
+ ASSERT_NE(-1, UtPrepareToCapture(2.0, TDM_TRANSFORM_270));
+
+ for (UtCapture & utCapture : captures) {
+ error = tdm_capture_commit(utCapture.capture);
+ ASSERT_EQ(TDM_ERROR_NONE, error);
+ }
+
+ UtHandleCaptureEvent();
+
+ ASSERT_EQ(captures.size(), utCaptureDoneHandlerSuccessCounter);
+}
+
+TEST_F(TDMCaptureCommit, CaptureCommitSuccessScaleAndTransformFliped)
+{
+ SKIP_FLAG(has_capture);
+ tdm_error error;
+
+ ASSERT_NE(-1, UtPrepareToCapture(2.0, TDM_TRANSFORM_FLIPPED));
+
+ for (UtCapture & utCapture : captures) {
+ error = tdm_capture_commit(utCapture.capture);
+ ASSERT_EQ(TDM_ERROR_NONE, error);
+ }
+
+ UtHandleCaptureEvent();
+
+ ASSERT_EQ(captures.size(), utCaptureDoneHandlerSuccessCounter);
+}
+
+TEST_F(TDMCaptureCommit, CaptureCommitSuccessScaleAndTransformFliped90)
+{
+ SKIP_FLAG(has_capture);
+ tdm_error error;
+
+ ASSERT_NE(-1, UtPrepareToCapture(2.0, TDM_TRANSFORM_FLIPPED_90));
+
+ for (UtCapture & utCapture : captures) {
+ error = tdm_capture_commit(utCapture.capture);
+ ASSERT_EQ(TDM_ERROR_NONE, error);
+ }
+
+ UtHandleCaptureEvent();
+
+ ASSERT_EQ(captures.size(), utCaptureDoneHandlerSuccessCounter);
+}
+
+TEST_F(TDMCaptureCommit, CaptureCommitSuccessScaleAndTransformFliped180)
+{
+ SKIP_FLAG(has_capture);
+ tdm_error error;
+
+ ASSERT_NE(-1, UtPrepareToCapture(2.0, TDM_TRANSFORM_FLIPPED_180));
+
+ for (UtCapture & utCapture : captures) {
+ error = tdm_capture_commit(utCapture.capture);
+ ASSERT_EQ(TDM_ERROR_NONE, error);
+ }
+
+ UtHandleCaptureEvent();
+
+ ASSERT_EQ(captures.size(), utCaptureDoneHandlerSuccessCounter);
+}
+
+TEST_F(TDMCaptureCommit, CaptureCommitSuccessScaleAndTransformFliped270)
+{
+ SKIP_FLAG(has_capture);
+ tdm_error error;
+
+ ASSERT_NE(-1, UtPrepareToCapture(2.0, TDM_TRANSFORM_FLIPPED_270));
+
+ for (UtCapture & utCapture : captures) {
+ error = tdm_capture_commit(utCapture.capture);
+ ASSERT_EQ(TDM_ERROR_NONE, error);
+ }
+
+ UtHandleCaptureEvent();
+
+ ASSERT_EQ(captures.size(), utCaptureDoneHandlerSuccessCounter);
+}
+
+TEST_F(TDMCaptureCommit, CaptureCommitSuccessScaleStream)
+{
+ SKIP_FLAG(has_capture);
+ tdm_error error;
+
+ ASSERT_NE(-1, UtPrepareToCapture(1.0, TDM_TRANSFORM_NORMAL, TDM_CAPTURE_TYPE_STREAM));
+
+ for (UtCapture & utCapture : captures) {
+ error = tdm_capture_commit(utCapture.capture);
+ ASSERT_EQ(TDM_ERROR_NONE, error);
+ }
+
+ UtHandleCaptureEvent();
+
+ ASSERT_EQ(captures.size(), utCaptureDoneHandlerSuccessCounter);
+}
\ No newline at end of file
~TDMClientTest()
{
- _stop_server();
+ stop_server();
unset_env_vars();
}
ASSERT_TRUE(TDM_ERROR_INVALID_PARAMETER == error);
}
-TEST_F(TDMClientTestClient, DISABLED_TdmClientHandleEventsSuccessful)
+TEST_F(TDMClientTestClient, TdmClientHandleEventsSuccessful)
{
ASSERT_EXIT(
{
ASSERT_TRUE(TDM_ERROR_INVALID_PARAMETER == error);
}
-TEST_F(TDMClientTestClientOutput, DISABLED_TdmClientOutputAddChangeHandlerSuccessful)
+TEST_F(TDMClientTestClientOutput, TdmClientOutputAddChangeHandlerSuccessful)
{
static bool got_an_event = false;
wl_display *wl_dsp;
#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 {
{
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);
}
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);
*
**************************************************************************/
+#include <limits.h>
#include "gtest/gtest.h"
#include "ut_common.h"
#include "stdint.h"
setenv("TDM_COMMIT_PER_VBLANK", "1", 1);
setenv("TDM_DLOG", "1", 1);
setenv("TDM_HWC", "1", 1);
- setenv("XDG_RUNTIME_DIR", ".", 1);
+ setenv("XDG_RUNTIME_DIR", "/run", 1);
setenv("TBM_DLOG", "1", 1);
setenv("TBM_DISPLAY_SERVER", "1", 1);
}
const tdm_output_mode *preferred_mode = NULL;
tdm_error error = TDM_ERROR_NONE;
int all_output_count = 0;
+ outputs = NULL;
SetEnv();
class TDMHwcWindow : public TDMOutputHwc {
protected:
tdm_hwc_window **hwc_wins;
+ tdm_hwc_window *video_hwc_win;
int hwc_count;
void SetUp(void)
{
hwc_count = 0;
+ video_hwc_win = NULL;
TDMOutputHwc::SetUp();
hwc_wins = (tdm_hwc_window **)calloc(output_count * HWC_WIN_NUM, sizeof(tdm_hwc_window *));
ASSERT_EQ(TDM_ERROR_NONE, error);
hwc_wins[hwc_count++] = hw;
}
+ if (!video_hwc_win) {
+ video_hwc_win = tdm_output_hwc_create_video_window(outputs[i], &error);
+ }
}
}
}
for (int i = 0; i < hwc_count; i++) {
tdm_output_hwc_destroy_window(outputs[0], hwc_wins[i]);
}
+
+ if (video_hwc_win)
+ tdm_output_hwc_destroy_window(outputs[0], video_hwc_win);
+
TDMOutputHwc::TearDown();
}
/* tdm_error tdm_output_hwc_set_client_target_buffer(tdm_output *output,
tbm_surface_h target_buffer, tdm_hwc_region damage,
tdm_hwc_window *composited_wnds, uint32_t num_wnds); */
-TEST_F(TDMOutputHwc, DISABLED_SetClientTargetBufferFailNullOutput)
+TEST_F(TDMOutputHwc, SetClientTargetBufferFailNullOutput)
{
tdm_hwc_region reg;
tbm_surface_h target_buff = CreateBufferForOutput(0);
ASSERT_NE(TDM_ERROR_NONE, error);
}
-TEST_F(TDMOutputHwcWithoutHwcCap, DISABLED_SetClientTargetBufferFailNoHwc)
+TEST_F(TDMOutputHwcWithoutHwcCap, SetClientTargetBufferFailNoHwc)
{
tdm_hwc_region damage;
}
}
-TEST_F(TDMOutputHwc, DISABLED_SetClientTargetBufferSuccessfulSetBuff)
+TEST_F(TDMOutputHwc, SetClientTargetBufferSuccessfulSetBuff)
{
tdm_hwc_region damage;
}
}
-TEST_F(TDMOutputHwc, DISABLED_SetClientTargetBufferSuccessfulResetBuff)
+TEST_F(TDMOutputHwc, SetClientTargetBufferSuccessfulResetBuff)
{
tdm_hwc_region damage = {.num_rects = 0, .rects = NULL};
for (int i = 0; i < hwc_count; i++) {
error = tdm_hwc_window_set_flags(hwc_wins[i], flag);
- ASSERT_EQ(TDM_ERROR_NONE, error);
+ ASSERT_TRUE(TDM_ERROR_NONE == error || TDM_ERROR_NOT_IMPLEMENTED == error);
}
}
for (int i = 0; i < hwc_count; i++) {
error = tdm_hwc_window_unset_flags(hwc_wins[i], flag);
- ASSERT_EQ(TDM_ERROR_NONE, error);
+ ASSERT_TRUE(TDM_ERROR_NONE == error || TDM_ERROR_NOT_IMPLEMENTED == error);
}
}
for (int i = 0; i < hwc_count; i++) {
/* hwc_window with TDM_COMPOSITION_CLIENT dosn't support tdm_hwc_window_video_get_capability()*/
- error = tdm_hwc_window_video_get_capability(hwc_wins[i], &video_capability);
+ error = tdm_hwc_window_video_get_capability(hwc_wins[i], &video_capability);
ASSERT_NE(TDM_ERROR_NONE, error);
- /*TODO:: check video capability for TDM_COMPOSITION_VIDEO*/
+ if (video_hwc_win != NULL) {
+ error = tdm_hwc_window_video_get_capability(video_hwc_win, &video_capability);
+ ASSERT_TRUE(TDM_ERROR_NONE == error || TDM_ERROR_NOT_IMPLEMENTED == error);
+ }
}
}
{
for (int i = 0; i < output_count; i++) {
if (IsHwcEnable(i)) {
+ /*
+ * This event can't be generated form user side.
+ * So just check a set and double set
+ */
+
/* test: first set*/
error = tdm_output_hwc_set_need_validate_handler(outputs[i], &need_validate_handler);
ASSERT_EQ(TDM_ERROR_NONE, error);
-
- error = tdm_backend_trigger_need_validate_event(outputs[i]);
- ASSERT_EQ(TDM_ERROR_NONE, error);
-
- error = tdm_display_handle_events(dpy);
- ASSERT_EQ(TDM_ERROR_NONE, error);
-
- ASSERT_EQ(1, need_validate_handler_is_called);
-
/* test: second isn't allowed*/
error = tdm_output_hwc_set_need_validate_handler(outputs[i], &need_validate_handler);
ASSERT_NE(TDM_ERROR_NONE, error);
}
}
+/* tdm_hwc_window * tdm_output_hwc_create_video_window(tdm_output *output, tdm_error *error); */
+TEST_F(TDMOutputHwc, CreateVideoWindowFailNull)
+{
+ ASSERT_EQ(NULL, tdm_output_hwc_create_video_window(NULL, &error));
+ ASSERT_NE(TDM_ERROR_NONE, error);
+}
+
+TEST_F(TDMOutputHwc, CreateVideoWindowSuccessful)
+{
+ for (int i = 0; i < output_count; i++) {
+ if (IsHwcEnable(i)) {
+ tdm_hwc_window * hw = tdm_output_hwc_create_video_window(outputs[i], &error);
+ if (error != TDM_ERROR_NOT_IMPLEMENTED) {
+ ASSERT_EQ(TDM_ERROR_NONE, error);
+ ASSERT_NE(NULL, hw);
+ error = tdm_output_hwc_destroy_window(outputs[i], hw);
+ ASSERT_EQ(TDM_ERROR_NONE, error);
+ }
+ } else {
+ ASSERT_EQ(NULL, tdm_output_hwc_create_video_window(outputs[i], &error));
+ ASSERT_NE(TDM_ERROR_NONE, error);
+ }
+ }
+}
+
+/* tdm_output_hwc_get_video_supported_formats() */
+TEST_F(TDMOutputHwc, GetVideoSupportedFormatsFailNull)
+{
+ tdm_error error;
+
+ error = tdm_output_hwc_get_video_supported_formats(NULL, NULL, NULL);
+ ASSERT_NE(TDM_ERROR_NONE, error);
+}
+
+TEST_F(TDMOutputHwc, GetVideoSupportedFormatsSuccessful)
+{
+ tdm_error error;
+ const tbm_format *formats;
+ int count;
+
+ for (int i = 0; i < output_count; i++) {
+ if (IsHwcEnable(i)) {
+ error = tdm_output_hwc_get_video_supported_formats(outputs[i], &formats, &count);
+ if (error != TDM_ERROR_NOT_IMPLEMENTED) {
+ ASSERT_EQ(TDM_ERROR_NONE, error);
+ if (count > 0)
+ ASSERT_NE(NULL, formats);
+ }
+ } else {
+ error = tdm_output_hwc_get_video_supported_formats(outputs[i], &formats, &count);
+ ASSERT_NE(TDM_ERROR_NONE, error);
+ }
+ }
+}
+
+/* tdm_hwc_window_video_get_available_properties() */
+TEST_F(TDMHwcWindow, GetAvailablePropertiesFailNullWin)
+{
+ SKIP_FLAG(video_hwc_win != NULL);
+ const tdm_prop *props;
+ int count;
+
+ error = tdm_hwc_window_video_get_available_properties(NULL, &props, &count);
+ ASSERT_NE(TDM_ERROR_NONE, error);
+
+ error = tdm_hwc_window_video_get_available_properties(video_hwc_win, NULL, &count);
+ ASSERT_NE(TDM_ERROR_NONE, error);
+
+ error = tdm_hwc_window_video_get_available_properties(video_hwc_win, &props, NULL);
+ ASSERT_NE(TDM_ERROR_NONE, error);
+}
+
+TEST_F(TDMHwcWindow, GetAvailablePropertiesSuccess)
+{
+ SKIP_FLAG(video_hwc_win != NULL);
+
+ const tdm_prop *props;
+ int count;
+
+ error = tdm_hwc_window_video_get_available_properties(video_hwc_win, &props, &count);
+ ASSERT_TRUE(TDM_ERROR_NONE == error || TDM_ERROR_NOT_IMPLEMENTED == error);
+}
+
+/* tdm_hwc_window_video_get_property() */
+TEST_F(TDMHwcWindow, GetPropertyFailNull)
+{
+ SKIP_FLAG(video_hwc_win != NULL);
+
+ tdm_value value;
+ int id = 1;
+
+ error = tdm_hwc_window_video_get_property(NULL, id, &value);
+ ASSERT_NE(TDM_ERROR_NONE, error);
+
+ error = tdm_hwc_window_video_get_property(video_hwc_win, id, NULL);
+ ASSERT_NE(TDM_ERROR_NONE, error);
+}
+
+TEST_F(TDMHwcWindow, GetPropertyFailWrongId)
+{
+ SKIP_FLAG(video_hwc_win != NULL);
+
+ tdm_value value;
+ int id = INT_MAX;
+
+ error = tdm_hwc_window_video_get_property(video_hwc_win, id, &value);
+ ASSERT_NE(TDM_ERROR_NONE, error);
+}
+
+/* tdm_hwc_window_video_set_property() */
+TEST_F(TDMHwcWindow, SetPropertyFailNull)
+{
+ SKIP_FLAG(video_hwc_win != NULL);
+ tdm_value value;
+ int id = 1;
+
+ error = tdm_hwc_window_video_set_property(NULL, id, value);
+ ASSERT_NE(TDM_ERROR_NONE, error);
+}
+
+TEST_F(TDMHwcWindow, SetPropertyFailWrongId)
+{
+ SKIP_FLAG(video_hwc_win != NULL);
+
+ tdm_value value;
+ int id = INT_MAX;
+
+ error = tdm_hwc_window_video_set_property(video_hwc_win, id, value);
+ ASSERT_NE(TDM_ERROR_NONE, error);
+}
+
setenv("TDM_THREAD", "0", 1);
setenv("TDM_COMMIT_PER_VBLANK", "1", 1);
setenv("TDM_DLOG", "1", 1);
- setenv("XDG_RUNTIME_DIR", ".", 1);
+ setenv("XDG_RUNTIME_DIR", "/run", 1);
setenv("TBM_DLOG", "1", 1);
setenv("TBM_DISPLAY_SERVER", "1", 1);
}
setenv("TDM_THREAD", "1", 1);
setenv("TDM_COMMIT_PER_VBLANK", "1", 1);
setenv("TDM_DLOG", "1", 1);
- setenv("XDG_RUNTIME_DIR", ".", 1);
+ setenv("XDG_RUNTIME_DIR", "/run", 1);
setenv("TBM_DLOG", "1", 1);
setenv("TBM_DISPLAY_SERVER", "1", 1);
}
setenv("TDM_THREAD", "0", 1);
setenv("TDM_COMMIT_PER_VBLANK", "0", 1);
setenv("TDM_DLOG", "1", 1);
- setenv("XDG_RUNTIME_DIR", ".", 1);
+ setenv("XDG_RUNTIME_DIR", "/run", 1);
setenv("TBM_DLOG", "1", 1);
setenv("TBM_DISPLAY_SERVER", "1", 1);
}
setenv("TDM_DEBUG_MODULE", "all", 1);
setenv("TDM_DEBUG", "1", 1);
setenv("TDM_DLOG", "1", 1);
- setenv("XDG_RUNTIME_DIR", ".", 1);
+ setenv("XDG_RUNTIME_DIR", "/run", 1);
setenv("TBM_DLOG", "1", 1);
setenv("TBM_DISPLAY_SERVER", "1", 1);
setenv("TDM_COMMIT_PER_VBLANK", "0", 1);
}
}
+int is_hwc_ennable(tdm_output * output)
+{
+ tdm_output_capability capabilities = (tdm_output_capability)0;
+ tdm_output_get_capabilities(output, &capabilities);
+ return capabilities & TDM_OUTPUT_CAPABILITY_HWC;
+}
+
TEST_F(TDMOutputHWC, OutputGetLayerCountFailHWC)
{
SKIP_FLAG(has_output);
tdm_output * output = tdm_display_get_output(dpy, i, &error);
ASSERT_FALSE(NULL == output);
ASSERT_TRUE(TDM_ERROR_NONE == error);
- ASSERT_TRUE(TDM_ERROR_NONE != tdm_output_get_layer_count(output, &count));
+ if (is_hwc_ennable(output))
+ ASSERT_TRUE(TDM_ERROR_NONE != tdm_output_get_layer_count(output, &count));
}
}
tdm_output * output = tdm_display_get_output(dpy, i, &error);
ASSERT_FALSE(NULL == output);
ASSERT_TRUE(TDM_ERROR_NONE == error);
- ASSERT_TRUE(nullptr == tdm_output_get_layer(output, 0, &error));
- ASSERT_TRUE(TDM_ERROR_NONE != error);
+ if (is_hwc_ennable(output)) {
+ ASSERT_TRUE(nullptr == tdm_output_get_layer(output, 0, &error));
+ ASSERT_TRUE(TDM_ERROR_NONE != error);
+ }
}
}
exit(0);}, ::testing::ExitedWithCode(0), "");
}
-TEST_F(TDMOutput, OutputGetCursorAvailableSizeSuccessful)
+/*TODO: this test has to be fixed in the backends by increase the ABI version upper than 1.5*/
+TEST_F(TDMOutput, DISABLED_OutputGetCursorAvailableSizeSuccessful)
{
SKIP_FLAG(has_output);
for (int i = 0; i < output_count; i++) {
exit(0);}, ::testing::ExitedWithCode(0), "");
}
-TEST_F(TDMOutput, OutputGetCursorAvailableSizeSuccessfulOnlyOutput)
+/*TODO: this test has to be fixed in the backends by increase the ABI version upper than 1.5*/
+TEST_F(TDMOutput, DISABLED_OutputGetCursorAvailableSizeSuccessfulOnlyOutput)
{
SKIP_FLAG(has_output);
ASSERT_EXIT({for (int i = 0; i < output_count; i++) {
ASSERT_FALSE(NULL == output);
ASSERT_TRUE(TDM_ERROR_NONE == error);
error = tdm_output_get_property(output, UINT_MAX, &value);
- ASSERT_TRUE(error == TDM_ERROR_NOT_IMPLEMENTED || error == TDM_ERROR_OPERATION_FAILED);
+ ASSERT_TRUE(error == TDM_ERROR_NOT_IMPLEMENTED || error == TDM_ERROR_NONE);
}
}
virtual void SetEnvs()
{
setenv("TDM_DLOG", "1", 1);
- setenv("XDG_RUNTIME_DIR", ".", 1);
+ setenv("XDG_RUNTIME_DIR", "/run", 1);
setenv("TBM_DLOG", "1", 1);
setenv("TDM_DEBUG_MODULE", "all", 1);
setenv("TDM_DEBUG", "1", 1);
tdm_error error = TDM_ERROR_NONE;
setenv("TDM_DLOG", "1", 1);
- setenv("XDG_RUNTIME_DIR", ".", 1);
+ setenv("XDG_RUNTIME_DIR", "/run", 1);
setenv("TBM_DLOG", "1", 1);
setenv("TBM_DISPLAY_SERVER", "1", 1);
/* FIXME: fix the error. If we initialize TBM before TDM we get fail
* in the tdm_output_set_dpms */
#if 0
- tbm_bufmgr = tbm_bufmgr_init(-1);
- ASSERT_FALSE(tbm_bufmgr == NULL);
+ bufmgr = tbm_bufmgr_init(-1);
+ ASSERT_FALSE(bufmgr == NULL);
#endif
dpy = tdm_display_init(&error);
::testing::ExitedWithCode(0), "");
}
-TEST_F(TDMVblank, DISABLED_VblankGetEnableFakeFailWrongOffsetPtr)
-{
- tdm_error error = TDM_ERROR_BAD_MODULE;
- SKIP_FLAG(has_output);
-
- ASSERT_EXIT({error = tdm_vblank_get_enable_fake(default_vblank, (unsigned int *)0xFFFFFFFF);
- if (error == TDM_ERROR_NONE)
- exit(1);
- else
- exit(0);},
- ::testing::ExitedWithCode(0), "");
-}
-
TEST_F(TDMVblank, VblankGetEnableFakeSuccessWithoutSet)
{
tdm_error error;