aports/main/libxkbcommon/allow-skip-test.patch
2025-02-23 21:35:16 +00:00

84 lines
2.7 KiB
Diff

Partial revert of 0ed9390c07130c2d3ebaf2e1b67c6dc0011a8aee
as we don't have xvfb, needed for the tests, packaged in main
diff --git a/test/x11.c b/test/x11.c
index c3cf2ee..4ff211e 100644
--- a/test/x11.c
+++ b/test/x11.c
@@ -45,7 +45,7 @@ X11_TEST(test_basic)
*/
conn = xcb_connect(display, NULL);
if (!conn || xcb_connection_has_error(conn)) {
- exit_code = TEST_SETUP_FAILURE;
+ exit_code = SKIP_TEST;
goto err_conn;
}
@@ -55,7 +55,7 @@ X11_TEST(test_basic)
XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS,
NULL, NULL, NULL, NULL);
if (!ret) {
- exit_code = TEST_SETUP_FAILURE;
+ exit_code = SKIP_TEST;
goto err_conn;
}
diff --git a/test/x11comp.c b/test/x11comp.c
index 33dd7c2..dc70fd1 100644
--- a/test/x11comp.c
+++ b/test/x11comp.c
@@ -51,7 +51,7 @@ X11_TEST(test_basic)
conn = xcb_connect(display, NULL);
if (xcb_connection_has_error(conn)) {
- ret = TEST_SETUP_FAILURE;
+ ret = SKIP_TEST;
goto err_conn;
}
ret = xkb_x11_setup_xkb_extension(conn,
@@ -60,7 +60,7 @@ X11_TEST(test_basic)
XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS,
NULL, NULL, NULL, NULL);
if (!ret) {
- ret = TEST_SETUP_FAILURE;
+ ret = SKIP_TEST;
goto err_xcb;
}
device_id = xkb_x11_get_core_keyboard_device_id(conn);
@@ -72,12 +72,12 @@ X11_TEST(test_basic)
ret = posix_spawnp(&xkbcomp_pid, "xkbcomp", NULL, NULL, xkbcomp_argv, envp);
free(xkb_path);
if (ret != 0) {
- ret = TEST_SETUP_FAILURE;
+ ret = SKIP_TEST;
goto err_xcb;
}
ret = waitpid(xkbcomp_pid, &status, 0);
if (ret < 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
- ret = TEST_SETUP_FAILURE;
+ ret = SKIP_TEST;
goto err_xcb;
}
diff --git a/test/xvfb-wrapper.c b/test/xvfb-wrapper.c
index ab0c645..144187a 100644
--- a/test/xvfb-wrapper.c
+++ b/test/xvfb-wrapper.c
@@ -77,7 +77,7 @@ xvfb_wrapper(int (*test_func)(char* display))
"Xvfb may be missing. Please install the corresponding "
"package, e.g. \"xvfb\" or \"xorg-x11-server-Xvfb\".\n");
}
- ret = TEST_SETUP_FAILURE;
+ ret = SKIP_TEST;
goto err_xvfd;
}
@@ -118,7 +118,7 @@ xvfb_wrapper(int (*test_func)(char* display))
length = fread(&display[1], 1, sizeof(display) - 1, display_fd);
if (length <= 0) {
fprintf(stderr, "fread error: length=%zu\n", length);
- ret = TEST_SETUP_FAILURE;
+ ret = SKIP_TEST;
goto err_xvfd;
} else {
/* Drop the newline character */