#include "nm-dispatcher-utils.h"
#include "nm-dispatcher-api.h"
+#include "nm-test-utils.h"
+
/*******************************************/
static gboolean
/*******************************************/
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
- g_test_init (&argc, &argv, NULL);
-
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
+ nmtst_init (&argc, &argv, TRUE);
g_test_add_func ("/dispatcher/up", test_up);
g_test_add_func ("/dispatcher/down", test_down);
#include <glib.h>
#include <string.h>
#include <nm-utils.h>
-#include <nm-glib-compat.h>
#include "nm-setting-dcb.h"
#include "nm-connection.h"
#include "nm-errors.h"
-#include "gsystem-local-alloc.h"
+
+#include "nm-test-utils.h"
#define DCB_FLAGS_ALL (NM_SETTING_DCB_FLAG_ENABLE | \
NM_SETTING_DCB_FLAG_ADVERTISE | \
#define TPATH "/libnm/settings/dcb/"
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
- g_test_init (&argc, &argv, NULL);
-
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
-
-#if !GLIB_CHECK_VERSION(2,34,0)
- g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
-#endif
+ nmtst_init (&argc, &argv, TRUE);
g_test_add_func (TPATH "flags-valid", test_dcb_flags_valid);
g_test_add_func (TPATH "flags-invalid", test_dcb_flags_invalid);
#include "nm-device-wifi.h"
#include "nm-device-ethernet.h"
#include "nm-device-wimax.h"
-#include "nm-glib-compat.h"
+
+#include "nm-test-utils.h"
#include "common.h"
/*******************************************************************/
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
-
- g_test_init (&argc, &argv, NULL);
+ nmtst_init (&argc, &argv, TRUE);
loop = g_main_loop_new (NULL, FALSE);
#include "nm-remote-settings.h"
#include "common.h"
-#include "gsystem-local-alloc.h"
+
+#include "nm-test-utils.h"
static NMTestServiceInfo *sinfo;
static NMRemoteSettings *settings = NULL;
/*******************************************************************/
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
int ret;
GError *error = NULL;
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
-
- g_test_init (&argc, &argv, NULL);
+ nmtst_init (&argc, &argv, TRUE);
bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
g_assert_no_error (error);
{
g_setenv ("LIBNM_USE_SESSION_BUS", "1", TRUE);
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
-
nmtst_init (&argc, &argv, TRUE);
loop = g_main_loop_new (NULL, FALSE);
/*******************************************************************/
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
g_setenv ("LIBNM_USE_SESSION_BUS", "1", TRUE);
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
-
- g_test_init (&argc, &argv, NULL);
+ nmtst_init (&argc, &argv, TRUE);
bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
g_assert_no_error (error);
#include <NetworkManager.h>
#include <nm-secret-agent-old.h>
-#include "nm-glib-compat.h"
-#include "nm-test-utils.h"
#include "common.h"
+#include "nm-test-utils.h"
+
/*******************************************************************/
enum {
/*******************************************************************/
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
g_setenv ("LIBNM_USE_SESSION_BUS", "1", TRUE);
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
-
- g_test_init (&argc, &argv, NULL);
+ nmtst_init (&argc, &argv, TRUE);
g_test_add ("/libnm/secret-agent/none", TestSecretAgentData, NULL,
test_setup, test_secret_agent_none, test_cleanup);
#include "nm-dbus-glib-types.h"
#include "nm-core-internal.h"
+#include "nm-logging.h"
+
+#include "nm-test-utils.h"
#define DEBUG 1
/*******************************************/
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
gsize i;
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
-
- g_test_init (&argc, &argv, NULL);
+ nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT");
g_test_add_func ("/wifi/lock_bssid",
test_lock_bssid);
#include <arpa/inet.h>
#include "nm-dnsmasq-utils.h"
+#include "nm-logging.h"
+
+#include "nm-test-utils.h"
static guint32
addr_to_num (const char *addr)
/*******************************************/
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
- g_test_init (&argc, &argv, NULL);
-
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
+ nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT");
g_test_add_func ("/dnsmasq-manager/address-ranges", test_address_ranges);
#include "nm-logging.h"
#include "interface_parser.h"
#include "parser.h"
+#include "nm-logging.h"
#include "nm-test-utils.h"
expected_free (e);
}
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
-
- nm_logging_setup ("WARN", "DEFAULT", NULL, NULL);
-
- g_test_init (&argc, &argv, NULL);
+ nmtst_init_assert_logging (&argc, &argv, "WARN", "DEFAULT");
if (0)
dump_blocks ();
#include <string.h>
#include "nm-dcb.h"
+#include "nm-logging.h"
+
+#include "nm-test-utils.h"
typedef struct {
guint num;
/*******************************************/
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
- g_test_init (&argc, &argv, NULL);
-
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
+ nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT");
g_test_add_func ("/dcb/fcoe", test_dcb_fcoe);
g_test_add_func ("/dcb/iscsi", test_dcb_iscsi);
#include "nm-ip4-config.h"
#include "nm-ip6-config.h"
#include "nm-platform.h"
+#include "nm-logging.h"
+
+#include "nm-test-utils.h"
static void
test_capture_empty (void)
}
/*******************************************/
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
- g_test_init (&argc, &argv, NULL);
-
-#if !GLIB_CHECK_VERSION (2,35,0)
- g_type_init ();
-#endif
+ nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT");
g_test_add_func ("/resolvconf-capture/empty", test_capture_empty);
g_test_add_func ("/resolvconf-capture/basic4", test_capture_basic4);
#include <nm-simple-connection.h>
#include <nm-setting-connection.h>
#include "nm-device-ethernet-utils.h"
-#include "gsystem-local-alloc.h"
+#include "nm-logging.h"
+
+#include "nm-test-utils.h"
static NMConnection *
_new_connection (const char *id)
/*******************************************/
+NMTST_DEFINE ();
+
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
-
- g_test_init (&argc, &argv, NULL);
+ nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT");
g_test_add_func ("/defname/no_connections", test_defname_no_connections);
g_test_add_func ("/defname/no_conflict", test_defname_no_conflict);