aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/vnc-display-test.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-06 16:27:50 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-13 15:41:32 +0400
commitf02b2c19174e3b5e0823e55cfb50d1b3153a485e (patch)
tree8c27b3a9f9e957564b8b44bfd9d599dab84d1771 /tests/qtest/vnc-display-test.c
parent61683d278be8614ba4d5e9cc21226ac50f4f46d0 (diff)
qtest: enable vnc-display test on win32
Now that qtest_qmp_add_client() works on win32, we can enable the VNC test. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Message-Id: <20230306122751.2355515-11-marcandre.lureau@redhat.com>
Diffstat (limited to 'tests/qtest/vnc-display-test.c')
-rw-r--r--tests/qtest/vnc-display-test.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/qtest/vnc-display-test.c b/tests/qtest/vnc-display-test.c
index e52a4326ec..f8933b0761 100644
--- a/tests/qtest/vnc-display-test.c
+++ b/tests/qtest/vnc-display-test.c
@@ -19,7 +19,7 @@ typedef struct Test {
GMainLoop *loop;
} Test;
-#if !defined(WIN32) && !defined(CONFIG_DARWIN)
+#if !defined(CONFIG_DARWIN)
static void on_vnc_error(VncConnection* self,
const char* msg)
@@ -38,10 +38,7 @@ static void on_vnc_auth_failure(VncConnection *self,
static bool
test_setup(Test *test)
{
-#ifdef WIN32
- g_test_skip("Not supported on Windows yet");
- return false;
-#elif defined(CONFIG_DARWIN)
+#if defined(CONFIG_DARWIN)
g_test_skip("Broken on Darwin");
return false;
#else
@@ -59,7 +56,12 @@ test_setup(Test *test)
g_signal_connect(test->conn, "vnc-auth-failure",
G_CALLBACK(on_vnc_auth_failure), NULL);
vnc_connection_set_auth_type(test->conn, VNC_CONNECTION_AUTH_NONE);
+
+#ifdef WIN32
+ vnc_connection_open_fd(test->conn, _get_osfhandle(pair[0]));
+#else
vnc_connection_open_fd(test->conn, pair[0]);
+#endif
test->loop = g_main_loop_new(NULL, FALSE);
return true;