[network-manager-vpnc/th/vpn-editor-split-bgo766170: 11/16] src/tests: refactor test-vpnc-output



commit 79ef504ad9c5631ecc52d8d99ddd6744372d142d
Author: Thomas Haller <thaller redhat com>
Date:   Mon May 9 12:07:33 2016 +0200

    src/tests: refactor test-vpnc-output

 .gitignore             |    2 ++
 src/Makefile.am        |    4 ++--
 src/test-vpnc-output.c |    6 +++++-
 3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a2ba9d0..1713656 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,8 @@ appdata/network-manager-vpnc.metainfo.xml
 /test-driver
 */tests/*.log
 */tests/*.trs
+/src/*.log
+/src/*.trs
 
 /cscope.*
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 1263d1c..ad7b965 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,7 +41,7 @@ test_vpnc_output_SOURCES = \
 
 test_vpnc_output_LDADD = $(GLIB_LIBS)
 
-check-local:
-       $(abs_builddir)/test-vpnc-output
+TESTS = \
+       test-vpnc-output
 
 CLEANFILES = *~
diff --git a/src/test-vpnc-output.c b/src/test-vpnc-output.c
index 5eefb5e..2d0873f 100644
--- a/src/test-vpnc-output.c
+++ b/src/test-vpnc-output.c
@@ -24,6 +24,8 @@
 
 #include "utils.h"
 
+#include "nm-test-utils.h"
+
 #define TEST_HEADER \
        GString *output;\
        guint pos = 0, num, olen, linelen;\
@@ -267,10 +269,12 @@ Password for VPN person 1 1 1 1: ";
        TEST_CLEANUP
 }
 
+NMTST_DEFINE ();
+
 int
 main (int argc, char **argv)
 {
-       g_test_init (&argc, &argv, NULL);
+       nmtst_init (&argc, &argv, TRUE);
 
        g_test_add_func ("/output/simple", test_output_simple);
        g_test_add_func ("/output/message", test_output_message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]