core: add compatibility wrapper for g_test_skip() to nm-glib-compat.h

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-04-22 17:05:41 +02:00
parent 284ef00d16
commit ed868a388b
6 changed files with 15 additions and 6 deletions

View file

@ -96,4 +96,18 @@ g_type_ensure (GType type)
#define g_test_initialized() (g_test_config_vars->test_initialized)
#endif
/* g_test_skip() is only available since glib 2.38. Add a compatibility wrapper. */
inline static void
__nmtst_g_test_skip (const gchar *msg)
{
#if GLIB_CHECK_VERSION (2, 38, 0)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_test_skip (msg);
G_GNUC_END_IGNORE_DEPRECATIONS
#else
g_debug ("%s", msg);
#endif
}
#define g_test_skip __nmtst_g_test_skip
#endif /* NM_GLIB_COMPAT_H */

View file

@ -33,6 +33,7 @@
#include <errno.h>
#include "nm-utils.h"
#include "nm-glib-compat.h"
struct __nmtst_internal

View file

@ -43,7 +43,6 @@
#include "nm-utils.h"
#include "nm-util-private.h"
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
#include "nm-test-utils.h"

View file

@ -49,7 +49,6 @@
#include <nm-util-private.h>
#include "NetworkManagerUtils.h"
#include "nm-glib-compat.h"
#include "common.h"
#include "reader.h"

View file

@ -41,8 +41,6 @@
#include <nm-setting-8021x.h>
#include <nm-setting-infiniband.h>
#include "nm-glib-compat.h"
#include "reader.h"
#include "writer.h"

View file

@ -39,8 +39,6 @@
#include <nm-setting-ip4-config.h>
#include <nm-setting-8021x.h>
#include "nm-glib-compat.h"
#include "nm-supplicant-config.h"
#include "nm-supplicant-settings-verify.h"