about summary refs log tree commit diff
path: root/src/dhcp/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/dhcp/tests')
-rw-r--r--src/dhcp/tests/meson.build2
-rw-r--r--src/dhcp/tests/test-dhcp-dhclient.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/dhcp/tests/meson.build b/src/dhcp/tests/meson.build
index 32badae8..9d8be427 100644
--- a/src/dhcp/tests/meson.build
+++ b/src/dhcp/tests/meson.build
@@ -8,7 +8,7 @@ foreach test_unit: test_units
     test_unit,
     test_unit + '.c',
     dependencies: test_nm_dep,
-    c_args: '-DTESTDIR="@0@"'.format(meson.current_source_dir())
+    c_args: nm_build_cflags,
   )
 
   test(
diff --git a/src/dhcp/tests/test-dhcp-dhclient.c b/src/dhcp/tests/test-dhcp-dhclient.c
index 25af51a1..a8284b23 100644
--- a/src/dhcp/tests/test-dhcp-dhclient.c
+++ b/src/dhcp/tests/test-dhcp-dhclient.c
@@ -36,6 +36,8 @@
 
 #include "nm-test-utils-core.h"
 
+#define TEST_DIR             NM_BUILD_SRCDIR"/src/dhcp/tests"
+
 static void
 test_config (const char *orig,
              const char *expected,
@@ -736,7 +738,7 @@ test_read_duid_from_leasefile (void)
 	gconstpointer duid_arr;
 	gsize duid_len;
 
-	duid = nm_dhcp_dhclient_read_duid (TESTDIR "/test-dhclient-duid.leases", &error);
+	duid = nm_dhcp_dhclient_read_duid (TEST_DIR"/test-dhclient-duid.leases", &error);
 	g_assert_no_error (error);
 	g_assert (duid);
 	duid_arr = g_bytes_get_data (duid, &duid_len);
@@ -750,7 +752,7 @@ test_read_commented_duid_from_leasefile (void)
 	GBytes *duid;
 	GError *error = NULL;
 
-	duid = nm_dhcp_dhclient_read_duid (TESTDIR "/test-dhclient-commented-duid.leases", &error);
+	duid = nm_dhcp_dhclient_read_duid (TEST_DIR"/test-dhclient-commented-duid.leases", &error);
 	g_assert_no_error (error);
 	g_assert (duid == NULL);
 }