about summary refs log tree commit diff
path: root/src/settings/plugins/ibft/tests
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-04-23 18:00:21 +0200
committerMichael Biebl <biebl@debian.org>2018-04-23 18:00:21 +0200
commitf60117b41d5433be1b4a96d82cd11d0c3dce9b63 (patch)
tree2dd55c4ab0fdcbe9cddb26adb4a554b1a45c73c8 /src/settings/plugins/ibft/tests
parent7e9ff09fcb2366b383b7ebbec80d2f6fff117290 (diff)
New upstream version 1.11.3 upstream/1.11.3
Diffstat (limited to 'src/settings/plugins/ibft/tests')
-rw-r--r--src/settings/plugins/ibft/tests/meson.build22
-rw-r--r--src/settings/plugins/ibft/tests/test-ibft.c2
2 files changed, 23 insertions, 1 deletions
diff --git a/src/settings/plugins/ibft/tests/meson.build b/src/settings/plugins/ibft/tests/meson.build
new file mode 100644
index 00000000..7a9445dd
--- /dev/null
+++ b/src/settings/plugins/ibft/tests/meson.build
@@ -0,0 +1,22 @@
+test_unit = 'test-ibft'
+
+test_ibft_dir = meson.current_source_dir()
+
+cflags = [
+  '-DTEST_IBFT_DIR="@0@"'.format(test_ibft_dir),
+  '-DTEST_SCRATCH_DIR="@0@"'.format(test_ibft_dir)
+]
+
+exe = executable(
+  test_unit,
+  test_unit + '.c',
+  dependencies: test_nm_dep,
+  c_args: cflags,
+  link_with: libnms_ibft_core
+)
+
+test(
+  'ibft/' + test_unit,
+  test_script,
+  args: test_args + [exe.full_path()]
+)
diff --git a/src/settings/plugins/ibft/tests/test-ibft.c b/src/settings/plugins/ibft/tests/test-ibft.c
index 72d1a7db..fd2ec61b 100644
--- a/src/settings/plugins/ibft/tests/test-ibft.c
+++ b/src/settings/plugins/ibft/tests/test-ibft.c
@@ -181,7 +181,7 @@ test_read_ibft_malformed (gconstpointer user_data)
 
 	g_assert (g_file_test (iscsiadm_path, G_FILE_TEST_EXISTS));
 
-	g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*malformed iscsiadm record*");
+	NMTST_EXPECT_NM_WARN ("*malformed iscsiadm record*");
 
 	success = nms_ibft_reader_load_blocks (iscsiadm_path, &blocks, &error);
 	g_assert_no_error (error);