[network-manager-openvpn/th/ovpn-import-bgo761285: 16/22] properties/tests: use nmtst_init() to setup test environment
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/th/ovpn-import-bgo761285: 16/22] properties/tests: use nmtst_init() to setup test environment
- Date: Wed, 3 Feb 2016 17:31:31 +0000 (UTC)
commit 13515c6e2a22475ef8428f6d189f83351987589f
Author: Thomas Haller <thaller redhat com>
Date: Wed Feb 3 12:48:17 2016 +0100
properties/tests: use nmtst_init() to setup test environment
Do it like we do in NetworkManager core project.
For example, now the test properly fails when printing a g_warning()
or g_critical(). And you can overwrite it for debugging via
$ NMTST_DEBUG=no-expect-message properties/tests/test-import-export
properties/tests/test-import-export.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index 1c93a98..7166c57 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -1446,18 +1446,18 @@ test_args_parse_line (void)
/*****************************************************************************/
+NMTST_DEFINE ();
+
int main (int argc, char **argv)
{
GError *error = NULL;
char *basename;
NMVpnEditorPlugin *plugin = NULL;
-#if !GLIB_CHECK_VERSION (2, 35, 0)
- g_type_init ();
-#endif
-
_nmovpn_test_temp_path = TEST_BUILDDIR_CONF;
+ nmtst_init (&argc, &argv, TRUE);
+
plugin = nm_vpn_editor_plugin_factory (&error);
if (error)
FAIL ("plugin-init", "failed to initialize UI plugin: %s", error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]