]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Bump GLib dependency for tests to 2.40
authorSimon McVittie <smcv@collabora.com>
Fri, 9 Jun 2017 13:46:32 +0000 (14:46 +0100)
committerSimon McVittie <smcv@collabora.com>
Mon, 12 Jun 2017 10:40:18 +0000 (11:40 +0100)
This is quite old (it's the version in Ubuntu 14.04 LTS, and older
than the version in Debian 8) but gives us g_test_skip(),
g_test_trap_subprocess() and GVariantDict, all of which will be
useful in the regression tests.

Remove workarounds for old versions.

After this commit we are still using the deprecated g_test_trap_fork(),
which will be removed in a subsequent commit. Don't opt-in to the new
deprecation warnings from 2.38 and 2.40 yet, because under our recommended
settings for dbus developers (-Werror) they would break the build.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101362

configure.ac
test/internals/refs.c
test/test-utils-glib.h

index b05c708bfa4a4460ffa0b27e8db57043601f69c8..dcfcb4e81975a0eeca8ad88cc62e1b7e1680185d 100644 (file)
@@ -263,13 +263,13 @@ fi
 # or binaries.
 
 AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_36], [Ignore post-2.36 deprecations])
-AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_38], [Prevent post-2.38 APIs])
+AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_40], [Prevent post-2.40 APIs])
 
 with_glib=yes
 
 AS_IF([test "x$enable_modular_tests" != xno],
   [
-  PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.36, gio-2.0 >= 2.36],
+  PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.40, gio-2.0 >= 2.40],
     [
       AS_IF([test "x$dbus_unix" = xyes],
         [PKG_CHECK_MODULES([GIO_UNIX], [gio-unix-2.0],
index a465662246799bf3a83cae8713f83c99275a6ef7..f9776378660f979db4c557808822eaaa7a43e826 100644 (file)
@@ -80,11 +80,6 @@ typedef struct {
   VoidFunc unlock;
 } Thread;
 
-/* provide backwards compatibility shim when building with a glib <= 2.30.x */
-#if !GLIB_CHECK_VERSION(2,31,0)
-#define g_thread_new(name,func,data) g_thread_create(func,data,TRUE,NULL)
-#endif
-
 static gpointer
 ref_thread (gpointer data)
 {
index d4b2e614b3757960a69cb86197fc0f2bdecb1605..2e1073f0095db9e8d75beed9a9ed14b6057ebaed 100644 (file)
@@ -84,14 +84,6 @@ void test_init (int *argcp, char ***argvp);
 
 void test_progress (char symbol);
 
-#if !GLIB_CHECK_VERSION (2, 38, 0)
-#define g_test_skip(s) my_test_skip (s)
-static inline void my_test_skip (const gchar *s)
-{
-  g_test_message ("SKIP: %s", s);
-}
-#endif
-
 void test_remove_if_exists (const gchar *path);
 void test_rmdir_must_exist (const gchar *path);
 void test_rmdir_if_exists (const gchar *path);