Commit 95c1579e authored by Thomas Haller's avatar Thomas Haller

all: merge branch 'th/nm-compilation-type'

https://github.com/NetworkManager/NetworkManager/pull/51
parents cd476e4d 52baa8c5
This diff is collapsed.
......@@ -30,9 +30,9 @@ deps = [
readline_dep
]
cflags = [
cflags = clients_cflags + [
'-DG_LOG_DOMAIN="nmcli"',
'-DNMCLI_LOCALEDIR="@0@"'.format(nm_localedir)
'-DNMCLI_LOCALEDIR="@0@"'.format(nm_localedir),
]
ldflags = []
......
......@@ -20,7 +20,6 @@
#ifndef NMC_NMCLI_H
#define NMC_NMCLI_H
#include "NetworkManager.h"
#include "nm-secret-agent-old.h"
#include "nm-meta-setting-desc.h"
......
......@@ -13,9 +13,8 @@ deps = [
libnm_dep
]
cflags = [
cflags = clients_cflags + [
'-DG_LOG_DOMAIN="libnmc"',
'-DNMLOCALEDIR="@0@"'.format(nm_localedir)
]
sources = shared_utils + files(
......@@ -29,7 +28,7 @@ libnmc_base = static_library(
sources: sources + [libnm_core_enum[1]],
include_directories: incs,
dependencies: deps,
c_args: common_cflags
c_args: cflags,
)
libnmc_base_dep = declare_dependency(
......@@ -75,7 +74,7 @@ libnmc = static_library(
sources: sources + [libnm_core_enum[1]],
include_directories: incs,
dependencies: deps,
c_args: common_cflags,
c_args: cflags,
link_with: libnmc_base,
link_depends: settings_docs_source
)
......
......@@ -27,7 +27,6 @@
#include "nm-common-macros.h"
#include "nm-utils/nm-enum-utils.h"
#include "NetworkManager.h"
#include "nm-vpn-helpers.h"
#include "nm-client-utils.h"
#include "nm-meta-setting-access.h"
......
......@@ -33,7 +33,6 @@
#include <string.h>
#include "NetworkManager.h"
#include "nm-vpn-service-plugin.h"
#include "nm-vpn-helpers.h"
......
......@@ -19,7 +19,6 @@
#ifndef __NM_SECRET_AGENT_SIMPLE_H__
#define __NM_SECRET_AGENT_SIMPLE_H__
#include "NetworkManager.h"
#include "nm-secret-agent-old.h"
#define NM_TYPE_SECRET_AGENT_SIMPLE (nm_secret_agent_simple_get_type ())
......
......@@ -19,8 +19,6 @@
#ifndef __NM_VPN_HELPERS_H__
#define __NM_VPN_HELPERS_H__
#include "NetworkManager.h"
typedef struct {
const char *name;
const char *ui_name;
......
......@@ -10,7 +10,9 @@ exe = executable(
test_unit + '.c',
include_directories: incs,
dependencies: deps,
c_args: cflags
c_args: clients_cflags + [
'-DNETWORKMANAGER_COMPILATION_TEST',
],
)
test(test_unit, exe)
......@@ -19,8 +19,6 @@
#include "nm-default.h"
#include "NetworkManager.h"
#include "nm-meta-setting-access.h"
#include "nm-utils/nm-test-utils.h"
......
......@@ -11,9 +11,13 @@ deps = [
libnm_dep
]
cflags = [
clients_cflags = [
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
'-DNMLOCALEDIR="@0@"'.format(nm_localedir),
]
cflags = clients_cflags + [
'-DG_LOG_DOMAIN="@0@"'.format(name),
'-DNMLOCALEDIR="@0@"'.format(nm_localedir)
]
ldflags = []
......
......@@ -38,8 +38,6 @@
#include <getopt.h>
#include <locale.h>
#include "NetworkManager.h"
#define PROGRESS_STEPS 15
#define EXIT_FAILURE_OFFLINE 1
......
incs = [
top_inc,
shared_inc,
libnm_core_inc
libnm_core_inc,
libnm_inc,
]
deps = [
......@@ -9,7 +10,10 @@ deps = [
newt_dep
]
cflags = ['-DG_LOG_DOMAIN="nmtui"']
cflags = clients_cflags + [
'-DG_LOG_DOMAIN="nmtui"',
'-DLOCALEDIR="@0@"'.format(nm_localedir),
]
subdir('newt')
......@@ -62,8 +66,6 @@ deps += [
libnmt_newt_dep
]
cflags += '-DLOCALEDIR="@0@"'.format(nm_localedir)
ldflags = []
if have_version_script
ldflags += '-Wl,--version-script,@0@'.format(linker_script_binary)
......
......@@ -19,8 +19,6 @@
#ifndef NM_EDITOR_BINDINGS_H
#define NM_EDITOR_BINDINGS_H
#include "NetworkManager.h"
void nm_editor_bindings_init (void);
void nm_editor_bind_ip_addresses_with_prefix_to_strv (int family,
......
......@@ -27,8 +27,6 @@
#include "nm-default.h"
#include "NetworkManager.h"
#include "nm-editor-utils.h"
#if 0
#include "nm-vpn-helpers.h"
......
......@@ -19,8 +19,6 @@
#ifndef NM_EDITOR_UTILS_H
#define NM_EDITOR_UTILS_H
#include "NetworkManager.h"
typedef struct {
const char *name;
GType setting_type;
......
......@@ -28,8 +28,6 @@
#include <stdlib.h>
#include "NetworkManager.h"
#include "nmtui.h"
#include "nmt-connect-connection-list.h"
#include "nm-client-utils.h"
......
......@@ -40,8 +40,6 @@
#include <sys/socket.h>
#include <linux/if_arp.h>
#include "NetworkManager.h"
#include "nmtui.h"
#include "nmt-device-entry.h"
......
......@@ -21,8 +21,6 @@
#include "nmt-editor-grid.h"
#include "NetworkManager.h"
#define NMT_TYPE_DEVICE_ENTRY (nmt_device_entry_get_type ())
#define NMT_DEVICE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMT_TYPE_DEVICE_ENTRY, NmtDeviceEntry))
#define NMT_DEVICE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMT_TYPE_DEVICE_ENTRY, NmtDeviceEntryClass))
......
......@@ -21,8 +21,6 @@
#include "nmt-newt.h"
#include "NetworkManager.h"
#define NMT_TYPE_EDIT_CONNECTION_LIST (nmt_edit_connection_list_get_type ())
#define NMT_EDIT_CONNECTION_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMT_TYPE_EDIT_CONNECTION_LIST, NmtEditConnectionList))
#define NMT_EDIT_CONNECTION_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMT_TYPE_EDIT_CONNECTION_LIST, NmtEditConnectionListClass))
......
......@@ -19,8 +19,6 @@
#ifndef NMT_EDITOR_PAGE_H
#define NMT_EDITOR_PAGE_H
#include "NetworkManager.h"
#include "nmt-editor-grid.h"
#include "nmt-editor-section.h"
......
......@@ -19,8 +19,6 @@
#ifndef NMT_EDITOR_H
#define NMT_EDITOR_H
#include "NetworkManager.h"
#include "nmt-newt.h"
#define NMT_TYPE_EDITOR (nmt_editor_get_type ())
......
......@@ -32,7 +32,6 @@
#include <string.h>
#include "NetworkManager.h"
#include "nm-common-macros.h"
......
......@@ -19,8 +19,6 @@
#ifndef NMT_ROUTE_EDITOR_H
#define NMT_ROUTE_EDITOR_H
#include "NetworkManager.h"
#include "nmt-newt.h"
#define NMT_TYPE_ROUTE_EDITOR (nmt_route_editor_get_type ())
......
......@@ -32,8 +32,6 @@
#include <netinet/in.h>
#include <stdlib.h>
#include "NetworkManager.h"
#include "nmt-route-entry.h"
#include "nmt-ip-entry.h"
......
......@@ -30,8 +30,6 @@
#include <netinet/in.h>
#include <stdlib.h>
#include "NetworkManager.h"
#include "nmt-route-table.h"
#include "nmt-route-entry.h"
#include "nmt-widget-list.h"
......
......@@ -26,8 +26,6 @@
#include "nm-default.h"
#include "NetworkManager.h"
#include "nmt-slave-list.h"
G_DEFINE_TYPE (NmtSlaveList, nmt_slave_list, NMT_TYPE_EDIT_CONNECTION_LIST)
......
......@@ -27,8 +27,6 @@
#include <stdlib.h>
#include "NetworkManager.h"
#include "nmtui.h"
#include "nmtui-edit.h"
#include "nmt-edit-connection-list.h"
......
......@@ -30,8 +30,6 @@
#include <stdlib.h>
#include <string.h>
#include "NetworkManager.h"
#include "nmt-newt.h"
#include "nm-editor-bindings.h"
......
......@@ -19,8 +19,6 @@
#ifndef NMTUI_H
#define NMTUI_H
#include "NetworkManager.h"
extern NMClient *nm_client;
void nmtui_quit (void);
......
......@@ -39,7 +39,9 @@ deps = [
cflags = [
'-DLIBEXECDIR="@0@"'.format(nm_libexecdir),
'-DSYSCONFDIR="@0@"'.format(nm_sysconfdir),
'-DNMCONFDIR="@0@"'.format(nm_pkgconfdir)
'-DNMCONFDIR="@0@"'.format(nm_pkgconfdir),
'-DG_LOG_DOMAIN="@0@"'.format(name),
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
]
libnm_dispatcher_core = static_library(
......
......@@ -4,10 +4,15 @@ incs = [
top_inc,
shared_inc,
libnm_core_inc,
libnm_inc,
dispatcher_inc
]
cflags = '-DSRCDIR="@0@"'.format(meson.current_source_dir())
cflags = [
'-DNETWORKMANAGER_COMPILATION_TEST',
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
'-DSRCDIR="@0@"'.format(meson.current_source_dir()),
]
exe = executable(
test_unit,
......
......@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <string.h>
#include "nm-core-internal.h"
#include "nm-dispatcher-utils.h"
#include "nm-dispatcher-api.h"
......
......@@ -24,6 +24,10 @@
#ifndef __CRYPTO_H__
#define __CRYPTO_H__
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header.
#endif
#define MD5_HASH_LEN 20
#define CIPHER_DES_EDE3_CBC "DES-EDE3-CBC"
#define CIPHER_DES_CBC "DES-CBC"
......
......@@ -142,7 +142,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="libnm"',
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB',
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
'-DLIBEXECDIR="@0@"'.format(nm_libexecdir),
'-DLOCALEDIR="@0@"'.format(nm_localedir),
'-DNMCONFDIR="@0@"'.format(nm_pkgconfdir),
......
......@@ -21,6 +21,10 @@
#ifndef __NM_CONNECTION_PRIVATE_H__
#define __NM_CONNECTION_PRIVATE_H__
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header.
#endif
#include "nm-setting.h"
#include "nm-connection.h"
......
......@@ -31,6 +31,9 @@
* statically against libnm-core. This basically means libnm-core, libnm, NetworkManager
* and some test programs.
**/
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL)
#error Cannot use this header.
#endif
#include "nm-connection.h"
......
......@@ -22,6 +22,10 @@
#ifndef NM_CORE_TYPES_INTERNAL_H
#define NM_CORE_TYPES_INTERNAL_H
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL)
#error Cannot use this header.
#endif
typedef struct {
guint32 from;
guint32 to;
......
......@@ -22,6 +22,10 @@
#ifndef __NM_KEYFILE_INTERNAL_H__
#define __NM_KEYFILE_INTERNAL_H__
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_INTERNAL)
#error Cannot use this header.
#endif
#include <sys/types.h>
#include "nm-connection.h"
......
......@@ -21,7 +21,9 @@
#ifndef __NM_KEYFILE_UTILS_H__
#define __NM_KEYFILE_UTILS_H__
#include <glib.h>
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header.
#endif
#define NM_KEYFILE_GROUP_VPN_SECRETS "vpn-secrets"
......
......@@ -23,6 +23,10 @@
#ifndef __NM_PROPERTY_COMPARE_H__
#define __NM_PROPERTY_COMPARE_H__
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header.
#endif
int nm_property_compare (GVariant *value1, GVariant *value2);
#endif /* __NM_PROPERTY_COMPARE_H__ */
......@@ -21,6 +21,10 @@
#ifndef __NM_SETTING_PRIVATE_H__
#define __NM_SETTING_PRIVATE_H__
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header.
#endif
#include "nm-setting.h"
#include "nm-connection.h"
#include "nm-core-enum-types.h"
......
......@@ -21,8 +21,8 @@
#ifndef __NM_UTILS_PRIVATE_H__
#define __NM_UTILS_PRIVATE_H__
#ifdef __NETWORKMANAGER_TYPES_H__
#error "nm-utils-private.h" must not be used outside of libnm-core/. Do you want "nm-core-internal.h"?
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header.
#endif
#include "nm-setting-private.h"
......
......@@ -35,7 +35,11 @@ incs = [
test_cert_dir = join_paths(meson.current_source_dir(), 'certs')
cflags = '-DTEST_CERT_DIR="@0@"'.format(test_cert_dir)
cflags = [
'-DNETWORKMANAGER_COMPILATION_TEST',
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
'-DTEST_CERT_DIR="@0@"'.format(test_cert_dir),
]
foreach test_unit: test_units
exe = executable(
......
This diff is collapsed.
......@@ -651,8 +651,7 @@ test_update_secrets_null_setting_name_with_setting_hash (void)
secrets = build_wep_secrets (wepkey);
g_test_expect_message ("libnm", G_LOG_LEVEL_CRITICAL,
NMTST_G_RETURN_MSG (setting_name != NULL || full_connection));
NMTST_EXPECT_LIBNM_CRITICAL (NMTST_G_RETURN_MSG (setting_name != NULL || full_connection));
success = nm_connection_update_secrets (connection, NULL, secrets, &error);
g_test_assert_expected_messages ();
g_assert_no_error (error);
......
......@@ -663,23 +663,23 @@ test_dcb_flags_invalid (void)
s_dcb = (NMSettingDcb *) nm_setting_dcb_new ();
g_assert (s_dcb);
g_test_expect_message ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
NMTST_EXPECT ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
TEST_FLAG (NM_SETTING_DCB_APP_FCOE_FLAGS, nm_setting_dcb_get_app_fcoe_flags, 0x332523);
g_test_assert_expected_messages ();
g_test_expect_message ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
NMTST_EXPECT ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
TEST_FLAG (NM_SETTING_DCB_APP_ISCSI_FLAGS, nm_setting_dcb_get_app_iscsi_flags, 0xFF);
g_test_assert_expected_messages ();
g_test_expect_message ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
NMTST_EXPECT ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
TEST_FLAG (NM_SETTING_DCB_APP_FIP_FLAGS, nm_setting_dcb_get_app_fip_flags, 0x1111);
g_test_assert_expected_messages ();
g_test_expect_message ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
NMTST_EXPECT ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
TEST_FLAG (NM_SETTING_DCB_PRIORITY_FLOW_CONTROL_FLAGS, nm_setting_dcb_get_priority_flow_control_flags, G_MAXUINT32);
g_test_assert_expected_messages ();
g_test_expect_message ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
NMTST_EXPECT ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
TEST_FLAG (NM_SETTING_DCB_PRIORITY_GROUP_FLAGS, nm_setting_dcb_get_priority_group_flags,
(NM_SETTING_DCB_FLAG_ENABLE | NM_SETTING_DCB_FLAG_ADVERTISE | NM_SETTING_DCB_FLAG_WILLING) + 1);
g_test_assert_expected_messages ();
......
......@@ -12,8 +12,11 @@ common_deps = [
]
common_cflags = [
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_GLIB',
]
cflags = common_cflags + [
'-DG_LOG_DOMAIN="libnm-glib"',
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY'
]
libnm_glib_inc = include_directories('.')
......@@ -64,17 +67,15 @@ install_headers(
incs = common_incs + [libnm_util_inc]
cflags = common_cflags + [
'-Wno-deprecated-declarations',
'-Wno-deprecated'
]
libdeprecated_nm_glib = static_library(
'deprecated-nm-glib',
sources: 'libnm_glib.c',
include_directories: incs,
dependencies: common_deps,
c_args: cflags
c_args: cflags + [
'-Wno-deprecated-declarations',
'-Wno-deprecated',
],
)
sources = files(
......@@ -119,7 +120,7 @@ libnm_glib_vpn = shared_library(
version: libnm_glib_vpn_version,
include_directories: common_incs,
dependencies: deps,
c_args: common_cflags,
c_args: cflags,
link_args: ldflags,
link_depends: symbol_map,
install: true
......@@ -200,8 +201,6 @@ deps = common_deps + [
libnm_util_dep
]
cflags = common_cflags + ['-DNMRUNDIR="@0@"'.format(nm_pkgrundir)]
symbol_map = join_paths(meson.current_source_dir(), 'libnm-glib.ver')
ldflags = []
......@@ -215,7 +214,9 @@ libnm_glib = shared_library(
version: libnm_glib_version,
include_directories: common_incs,
dependencies: deps,
c_args: cflags,
c_args: cflags + [
'-DNMRUNDIR="@0@"'.format(nm_pkgrundir),
],
link_with: libdeprecated_nm_glib,
link_args: ldflags,
link_depends: symbol_map,
......@@ -262,7 +263,9 @@ if enable_introspection
symbol_prefix: nm_id_prefix.to_lower(),
export_packages: ['libnm-glib', 'libnm-glib-vpn'],
includes: gir_includes,
extra_args: common_cflags + ['--include-uninstalled=' + libnm_util_gir[0].full_path()],
extra_args: cflags + [
'--include-uninstalled=' + libnm_util_gir[0].full_path(),
],
install: true
)
endif
......@@ -276,7 +279,7 @@ executable(
[name + '.c', libnm_utils_enum[1]],
include_directories: common_incs,
dependencies: deps,
c_args: common_cflags,
c_args: cflags,
link_with: libnm_glib
)
......
......@@ -11,11 +11,6 @@ deps = [
libnm_util_dep
]
cflags = [
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY',
'-DTEST_NM_SERVICE="@0@"'.format(join_paths(meson.source_root(), 'tools', 'test-networkmanager-service.py'))
]
test_units = [
'test-nm-client',
'test-remote-settings-client'
......@@ -27,7 +22,10 @@ foreach test_unit: test_units
[test_unit + '.c', libnm_utils_enum[1]] + shared_test_utils,
include_directories: incs,
dependencies: deps,
c_args: cflags
c_args: common_cflags + [
'-DNETWORKMANAGER_COMPILATION_TEST',
'-DTEST_NM_SERVICE="@0@"'.format(join_paths(meson.source_root(), 'tools', 'test-networkmanager-service.py')),
],
)
test(test_unit, exe)
......
......@@ -104,10 +104,13 @@ deps = [
uuid_dep
]
cflags = [
common_cflags = [
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_UTIL',
'-DLOCALEDIR="@0@"'.format(nm_localedir),
]
cflags = common_cflags + [
'-DG_LOG_DOMAIN="libnm-util"',
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY',
'-DLOCALEDIR="@0@"'.format(nm_localedir)
]
symbol_map = join_paths(meson.current_source_dir(), 'libnm-util.ver')
......
......@@ -10,9 +10,10 @@ deps = [
libnm_util_dep
]
cflags = [
cflags = common_cflags + [
'-DBUILD_DIR="@0@"'.format(meson.current_build_dir()),
'-DTEST_CERT_DIR="@0@"'.format(test_cert_dir)
'-DTEST_CERT_DIR="@0@"'.format(test_cert_dir),
'-DNETWORKMANAGER_COMPILATION_TEST',
]
test = 'test-libnm-linking'
......
This diff is collapsed.
......@@ -96,23 +96,23 @@ test_dcb_flags_invalid (void)
s_dcb = (NMSettingDcb *) nm_setting_dcb_new ();
g_assert (s_dcb);
g_test_expect_message ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
NMTST_EXPECT ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
TEST_FLAG (NM_SETTING_DCB_APP_FCOE_FLAGS, nm_setting_dcb_get_app_fcoe_flags, 0x332523);
g_test_assert_expected_messages ();
g_test_expect_message ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
NMTST_EXPECT ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
TEST_FLAG (NM_SETTING_DCB_APP_ISCSI_FLAGS, nm_setting_dcb_get_app_iscsi_flags, 0xFF);
g_test_assert_expected_messages ();
g_test_expect_message ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
NMTST_EXPECT ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
TEST_FLAG (NM_SETTING_DCB_APP_FIP_FLAGS, nm_setting_dcb_get_app_fip_flags, 0x1111);
g_test_assert_expected_messages ();
g_test_expect_message ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
NMTST_EXPECT ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
TEST_FLAG (NM_SETTING_DCB_PRIORITY_FLOW_CONTROL_FLAGS, nm_setting_dcb_get_priority_flow_control_flags, G_MAXUINT32);
g_test_assert_expected_messages ();
g_test_expect_message ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
NMTST_EXPECT ("GLib-GObject", G_LOG_LEVEL_WARNING, "*invalid or out of range*");
TEST_FLAG (NM_SETTING_DCB_PRIORITY_GROUP_FLAGS, nm_setting_dcb_get_priority_group_flags,
(NM_SETTING_DCB_FLAG_ENABLE | NM_SETTING_DCB_FLAG_ADVERTISE | NM_SETTING_DCB_FLAG_WILLING) + 1);
g_test_assert_expected_messages ();
......
......@@ -21,7 +21,7 @@ deps = [
cflags = [
'-DG_LOG_DOMAIN="libnm"',
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB',
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM',
'-DNMRUNDIR="@0@"'.format(nm_pkgrundir)
]
......
......@@ -21,6 +21,10 @@
#ifndef __NM_DBUS_HELPERS_PRIVATE_H__
#define __NM_DBUS_HELPERS_PRIVATE_H__
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
#error Cannot use this header.
#endif
#include "nm-dbus-compat.h"