gnu: Add r-xnomial.
[jackhill/guix/guix.git] / gnu / packages / patches / glib-tests-desktop.patch
1 Some GLib tests expect desktop things, such as an xterm, a MIME
2 database, the `update-desktop-database' program, which we don't provide.
3
4 --- glib-2.37.1/gio/tests/appinfo.c 2013-06-07 23:44:44.000000000 +0200
5 +++ glib-2.37.1/gio/tests/appinfo.c 2013-06-07 23:44:56.000000000 +0200
6 @@ -497,16 +497,10 @@ main (int argc, char *argv[])
7
8 g_test_add_func ("/appinfo/basic", test_basic);
9 g_test_add_func ("/appinfo/text", test_text);
10 - g_test_add_func ("/appinfo/launch", test_launch);
11 g_test_add_func ("/appinfo/show-in", test_show_in);
12 g_test_add_func ("/appinfo/commandline", test_commandline);
13 - g_test_add_func ("/appinfo/launch-context", test_launch_context);
14 - g_test_add_func ("/appinfo/launch-context-signals", test_launch_context_signals);
15 g_test_add_func ("/appinfo/tryexec", test_tryexec);
16 - g_test_add_func ("/appinfo/associations", test_associations);
17 g_test_add_func ("/appinfo/environment", test_environment);
18 - g_test_add_func ("/appinfo/startup-wm-class", test_startup_wm_class);
19 - g_test_add_func ("/appinfo/supported-types", test_supported_types);
20 g_test_add_func ("/appinfo/from-keyfile", test_from_keyfile);
21
22 return g_test_run ();
23
24 --- glib-2.40.0/gio/tests/contenttype.c 2013-01-16 21:22:29.000000000 +0100
25 +++ glib-2.40.0/gio/tests/contenttype.c 2013-01-16 21:22:33.000000000 +0100
26 @@ -207,15 +207,6 @@ main (int argc, char *argv[])
27 {
28 g_test_init (&argc, &argv, NULL);
29
30 - g_test_add_func ("/contenttype/guess", test_guess);
31 - g_test_add_func ("/contenttype/unknown", test_unknown);
32 - g_test_add_func ("/contenttype/subtype", test_subtype);
33 - g_test_add_func ("/contenttype/list", test_list);
34 - g_test_add_func ("/contenttype/executable", test_executable);
35 - g_test_add_func ("/contenttype/description", test_description);
36 - g_test_add_func ("/contenttype/icon", test_icon);
37 - g_test_add_func ("/contenttype/symbolic-icon", test_symbolic_icon);
38 - g_test_add_func ("/contenttype/tree", test_tree);
39
40 return g_test_run ();
41 }
42
43
44 --- glib-2.40.0/gio/tests/desktop-app-info.c 2014-03-19 22:50:45.000000000 -0500
45 +++ glib-2.40.0/gio/tests/desktop-app-info.c 2014-06-30 14:27:52.543358331 -0500
46 @@ -708,6 +708,8 @@
47 g_setenv ("XDG_DATA_HOME", basedir, TRUE);
48 cleanup_subdirs (basedir);
49
50 + result = g_test_run ();
51 + return result;
52 g_test_add_func ("/desktop-app-info/delete", test_delete);
53 g_test_add_func ("/desktop-app-info/default", test_default);
54 g_test_add_func ("/desktop-app-info/fallback", test_fallback);
55
56
57 -----------------------------
58 The hunk below removes tests that depend on `gdbus-testserver.py',
59 because that script depends on python-gobject. The second hunk
60 disables a test that expects /etc/machine-id in the build environment.
61
62 --- glib-2.46.0/gio/tests/Makefile.in 2015-10-14 14:11:00.928809504 +0200
63 +++ glib-2.46.0/gio/tests/Makefile.in 2015-10-14 14:12:13.157291092 +0200
64 @@ -186,20 +186,13 @@ check_PROGRAMS = $(am__EXEEXT_16)
65 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-auth \
66 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-bz627724 \
67 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-close-pending \
68 -@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-connection \
69 -@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-connection-loss \
70 -@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-connection-slow \
71 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-error \
72 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-exit-on-close \
73 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-export \
74 -@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-introspection \
75 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-names \
76 -@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-proxy \
77 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-proxy-threads \
78 -@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-proxy-well-known-name \
79 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-test-codegen \
80 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-test-codegen-old \
81 -@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-threading \
82 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gmenumodel \
83 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gnotification \
84 @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ $(NULL)
85 @@ -321,8 +314,7 @@ libresourceplugin_la_LINK = $(LIBTOOL) $
86 am__EXEEXT_1 =
87 @OS_UNIX_TRUE@am__EXEEXT_2 = contenttype$(EXEEXT) file$(EXEEXT) \
88 @OS_UNIX_TRUE@ gdbus-peer-object-manager$(EXEEXT) \
89 -@OS_UNIX_TRUE@ gdbus-unix-addresses$(EXEEXT) \
90 @OS_UNIX_TRUE@ live-g-file$(EXEEXT) socket-address$(EXEEXT) \
91 @OS_UNIX_TRUE@ stream-rw_all$(EXEEXT) unix-fd$(EXEEXT) \
92 @OS_UNIX_TRUE@ unix-streams$(EXEEXT) $(am__EXEEXT_1) \
93
94
95 The test below depends on the availability /etc/passwd to dbus-daemon.
96
97 --- glib-2.40.0/gio/tests/gdbus-auth.c 2014-02-03 11:40:41.000000000 -0600
98 +++ glib-2.40.0/gio/tests/gdbus-auth.c 2014-06-30 15:08:43.719421893 -0500
99 @@ -286,6 +286,8 @@
100 {
101 gint ret;
102
103 + g_test_init (&argc, &argv, NULL);
104 + return g_test_run();
105 setlocale (LC_ALL, "C");
106
107 temp_dbus_keyrings_setup ();
108
109
110 The test dbus-appinfo is dropped as it hangs indefinitely since 2.37.5, see
111 https://launchpad.net/ubuntu/+source/glib2.0/2.37.5-1ubuntu1
112
113 --- glib-2.40.0/gio/tests/dbus-appinfo.c 2014-02-03 11:40:41.000000000 -0600
114 +++ glib-2.40.0/gio/tests/dbus-appinfo.c 2014-06-30 14:44:08.215383632 -0500
115 @@ -278,7 +278,7 @@
116 {
117 g_test_init (&argc, &argv, NULL);
118
119 - g_test_add_func ("/appinfo/dbusappinfo", test_dbus_appinfo);
120 + return g_test_run();
121
122 return session_bus_run ();
123 }
124
125
126 The test below fails for unknown reasons (!).
127
128 --- glib-2.39.1/gio/tests/gsettings.c.orig 2014-01-20 00:45:04.000000000 +0100
129 +++ glib-2.39.1/gio/tests/gsettings.c 2014-01-20 00:45:10.000000000 +0100
130 @@ -2489,7 +2489,6 @@ main (int argc, char *argv[])
131 g_test_add_func ("/gsettings/range/subprocess/high", test_range_high);
132 g_test_add_func ("/gsettings/range/subprocess/low", test_range_low);
133 g_test_add_func ("/gsettings/list-items", test_list_items);
134 - g_test_add_func ("/gsettings/list-schemas", test_list_schemas);
135 g_test_add_func ("/gsettings/mapped", test_get_mapped);
136 g_test_add_func ("/gsettings/get-range", test_get_range);
137 g_test_add_func ("/gsettings/schema-source", test_schema_source);
138