about summary refs log tree commit diff
path: root/src/settings/plugins/ifupdown/tests
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2018-08-24 11:00:09 +0200
committerSebastien Bacher <seb128@ubuntu.com>2018-08-24 11:06:47 +0200
commitb7db94545968c37886b7111d8c85f62eb063fbb4 (patch)
tree7c2aedd497b1fdcb26bf9d49f98cc63a530baf2e /src/settings/plugins/ifupdown/tests
parent9d5cdc3adde9e7e57bf5a0e754e563b6a9e8e513 (diff)
parentcaf1db9d6fbc056cc6c76a24574890f6c7895f3d (diff)
Import Debian changes 1.12.2-0ubuntu3
network-manager (1.12.2-0ubuntu3) cosmic; urgency=medium

  * debian/rules:
    - use --with-libnm-glib, the default reversed since that's a legacy
      library but we still need it for unity-control-center

network-manager (1.12.2-0ubuntu2) cosmic; urgency=medium

  * debian/patches/git-newglib-test.patch:
    - backport upstream commit to fix the tests with the new glib 

network-manager (1.12.2-0ubuntu1) cosmic; urgency=medium

  * New upstream version
  * d/p/libnm-register-empty-NMClient-and-NetworkManager-when-loa.patch,
    d/p/e91f1a7d2a6b8400b6b331d5b72287dcb5164a39.patch,
    d/p/git_thunderbolt_connect.patch:
    - removed, those changes are in the new version
  * Backport Debian changes
  * Update symbols file for libnm0
  * Enable iwd support
  * Drop version requirements when oldstable ships a newer version
  * Drop dh_strip override, the dbgsym migration is done
  * Rebase patches
  * Make sure the example server.conf is actually installed
  * Update install path for plugins, it now includes a version number
  * Drop libnl3 build dependency.
    Upstream has copied the code directly from libnl3 for the few functions it
    needs with a few small modifications.
  * Drop libiw build dependency.
    Hasn't been needed for a long time and was simply a left over from older
    releases.
  * Bump Standards-Version to 4.1.5
  * Fix compile error due to NM_AVAILABLE_IN_1_12_2 macro (Closes: #905372)
Diffstat (limited to 'src/settings/plugins/ifupdown/tests')
-rw-r--r--src/settings/plugins/ifupdown/tests/meson.build15
-rw-r--r--src/settings/plugins/ifupdown/tests/test-ifupdown.c46
2 files changed, 40 insertions, 21 deletions
diff --git a/src/settings/plugins/ifupdown/tests/meson.build b/src/settings/plugins/ifupdown/tests/meson.build
new file mode 100644
index 00000000..ee3b6a34
--- /dev/null
+++ b/src/settings/plugins/ifupdown/tests/meson.build
@@ -0,0 +1,15 @@
+test_unit = 'test-ifupdown'
+
+exe = executable(
+  test_unit,
+  test_unit + '.c',
+  dependencies: test_nm_dep,
+  c_args: nm_build_cflags,
+  link_with: libnms_ifupdown_core
+)
+
+test(
+  'ifupdown/' + test_unit,
+  test_script,
+  args: test_args + [exe.full_path()]
+)
diff --git a/src/settings/plugins/ifupdown/tests/test-ifupdown.c b/src/settings/plugins/ifupdown/tests/test-ifupdown.c
index d037b8a6..18bad65e 100644
--- a/src/settings/plugins/ifupdown/tests/test-ifupdown.c
+++ b/src/settings/plugins/ifupdown/tests/test-ifupdown.c
@@ -29,6 +29,10 @@
 
 #include "nm-test-utils-core.h"
 
+#define TEST_DIR       NM_BUILD_SRCDIR"/src/settings/plugins/ifupdown/tests"
+
+/*****************************************************************************/
+
 typedef struct {
 	char *key;
 	char *data;
@@ -168,7 +172,7 @@ dump_blocks (void)
 	for (n = ifparser_getfirst (); n != NULL; n = n->next) {
 		if_data *m;
 
-		// each block start with its type & name 
+		// each block start with its type & name
 		// (single quotes used to show typ & name baoundaries)
 		g_print("'%s' '%s'\n", n->type, n->name);
 
@@ -659,45 +663,45 @@ main (int argc, char **argv)
 	if (0)
 		dump_blocks ();
 
-	g_test_add_data_func ("/ifupdate/ignore_line_before_first_block", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/ignore_line_before_first_block", TEST_DIR,
 	                      (GTestDataFunc) test1_ignore_line_before_first_block);
-	g_test_add_data_func ("/ifupdate/wrapped_line", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/wrapped_line", TEST_DIR,
 	                      (GTestDataFunc) test2_wrapped_line);
-	g_test_add_data_func ("/ifupdate/wrapped_multiline_multiarg", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/wrapped_multiline_multiarg", TEST_DIR,
 	                      (GTestDataFunc) test3_wrapped_multiline_multiarg);
-	g_test_add_data_func ("/ifupdate/allow_auto_is_auto", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/allow_auto_is_auto", TEST_DIR,
 	                      (GTestDataFunc) test4_allow_auto_is_auto);
-	g_test_add_data_func ("/ifupdate/allow_auto_multiarg", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/allow_auto_multiarg", TEST_DIR,
 	                      (GTestDataFunc) test5_allow_auto_multiarg);
-	g_test_add_data_func ("/ifupdate/mixed_whitespace", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/mixed_whitespace", TEST_DIR,
 	                      (GTestDataFunc) test6_mixed_whitespace);
-	g_test_add_data_func ("/ifupdate/long_line", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/long_line", TEST_DIR,
 	                      (GTestDataFunc) test7_long_line);
-	g_test_add_data_func ("/ifupdate/long_line_wrapped", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/long_line_wrapped", TEST_DIR,
 	                      (GTestDataFunc) test8_long_line_wrapped);
-	g_test_add_data_func ("/ifupdate/wrapped_lines_in_block", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/wrapped_lines_in_block", TEST_DIR,
 	                      (GTestDataFunc) test9_wrapped_lines_in_block);
-	g_test_add_data_func ("/ifupdate/complex_wrap", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/complex_wrap", TEST_DIR,
 	                      (GTestDataFunc) test11_complex_wrap);
-	g_test_add_data_func ("/ifupdate/complex_wrap_split_word", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/complex_wrap_split_word", TEST_DIR,
 	                      (GTestDataFunc) test12_complex_wrap_split_word);
-	g_test_add_data_func ("/ifupdate/more_mixed_whitespace", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/more_mixed_whitespace", TEST_DIR,
 	                      (GTestDataFunc) test13_more_mixed_whitespace);
-	g_test_add_data_func ("/ifupdate/mixed_whitespace_block_start", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/mixed_whitespace_block_start", TEST_DIR,
 	                      (GTestDataFunc) test14_mixed_whitespace_block_start);
-	g_test_add_data_func ("/ifupdate/trailing_space", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/trailing_space", TEST_DIR,
 	                      (GTestDataFunc) test15_trailing_space);
-	g_test_add_data_func ("/ifupdate/missing_newline", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/missing_newline", TEST_DIR,
 	                      (GTestDataFunc) test16_missing_newline);
-	g_test_add_data_func ("/ifupdate/read_static_ipv4", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/read_static_ipv4", TEST_DIR,
 	                      (GTestDataFunc) test17_read_static_ipv4);
-	g_test_add_data_func ("/ifupdate/read_static_ipv6", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/read_static_ipv6", TEST_DIR,
 	                      (GTestDataFunc) test18_read_static_ipv6);
-	g_test_add_data_func ("/ifupdate/read_static_ipv4_plen", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/read_static_ipv4_plen", TEST_DIR,
 	                      (GTestDataFunc) test19_read_static_ipv4_plen);
-	g_test_add_data_func ("/ifupdate/source_stanza", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/source_stanza", TEST_DIR,
 	                      (GTestDataFunc) test20_source_stanza);
-	g_test_add_data_func ("/ifupdate/source_dir_stanza", TEST_ENI_DIR,
+	g_test_add_data_func ("/ifupdate/source_dir_stanza", TEST_DIR,
 	                      (GTestDataFunc) test21_source_dir_stanza);
 
 	return g_test_run ();