mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 21:10:08 +01:00
tests: use absolute path for certs test directory
Allows to run the test without first switching directory ./libnm-core/tests/test-secrets
This commit is contained in:
parent
2822f92434
commit
b769b4dfcb
4 changed files with 6 additions and 8 deletions
|
|
@ -9,8 +9,6 @@ BUILT_SOURCES = $(GLIB_GENERATED)
|
||||||
|
|
||||||
if ENABLE_TESTS
|
if ENABLE_TESTS
|
||||||
|
|
||||||
certsdir = $(srcdir)/certs
|
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I${top_srcdir}/shared \
|
-I${top_srcdir}/shared \
|
||||||
-I${top_builddir}/shared \
|
-I${top_builddir}/shared \
|
||||||
|
|
@ -18,7 +16,7 @@ AM_CPPFLAGS = \
|
||||||
-I$(top_builddir)/libnm-core \
|
-I$(top_builddir)/libnm-core \
|
||||||
-DNETWORKMANAGER_COMPILATION \
|
-DNETWORKMANAGER_COMPILATION \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
-DTEST_CERT_DIR=\"$(certsdir)\"
|
-DTEST_CERT_DIR=\"$(abs_srcdir)/certs\"
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
noinst_PROGRAMS = \
|
||||||
test-compare \
|
test-compare \
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ AM_CPPFLAGS = \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
-DBUILD_DIR=\"$(abs_builddir)\" \
|
-DBUILD_DIR=\"$(abs_builddir)\" \
|
||||||
-DTEST_CERT_DIR=\"$(top_srcdir)/libnm-core/tests/certs/\"
|
-DTEST_CERT_DIR=\"$(abs_top_srcdir)/libnm-core/tests/certs\"
|
||||||
|
|
||||||
@VALGRIND_RULES@
|
@VALGRIND_RULES@
|
||||||
TESTS = \
|
TESTS = \
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/src/supplicant-manager \
|
-I$(top_srcdir)/src/supplicant-manager \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||||
-DTEST_CERT_DIR=\"$(srcdir)/certs/\" \
|
-DTEST_CERT_DIR=\"$(abs_srcdir)/certs\" \
|
||||||
$(GLIB_CFLAGS)
|
$(GLIB_CFLAGS)
|
||||||
|
|
||||||
noinst_PROGRAMS = test-supplicant-config
|
noinst_PROGRAMS = test-supplicant-config
|
||||||
|
|
|
||||||
|
|
@ -530,9 +530,9 @@ test_wifi_eap (void)
|
||||||
s_8021x = (NMSetting8021x *) nm_setting_802_1x_new ();
|
s_8021x = (NMSetting8021x *) nm_setting_802_1x_new ();
|
||||||
nm_connection_add_setting (connection, NM_SETTING (s_8021x));
|
nm_connection_add_setting (connection, NM_SETTING (s_8021x));
|
||||||
nm_setting_802_1x_add_eap_method (s_8021x, "tls");
|
nm_setting_802_1x_add_eap_method (s_8021x, "tls");
|
||||||
nm_setting_802_1x_set_client_cert (s_8021x, TEST_CERT_DIR "test-cert.p12", NM_SETTING_802_1X_CK_SCHEME_PATH, NULL, NULL);
|
nm_setting_802_1x_set_client_cert (s_8021x, TEST_CERT_DIR "/test-cert.p12", NM_SETTING_802_1X_CK_SCHEME_PATH, NULL, NULL);
|
||||||
nm_setting_802_1x_set_ca_cert (s_8021x, TEST_CERT_DIR "test-ca-cert.pem", NM_SETTING_802_1X_CK_SCHEME_PATH, NULL, NULL);
|
nm_setting_802_1x_set_ca_cert (s_8021x, TEST_CERT_DIR "/test-ca-cert.pem", NM_SETTING_802_1X_CK_SCHEME_PATH, NULL, NULL);
|
||||||
nm_setting_802_1x_set_private_key (s_8021x, TEST_CERT_DIR "test-cert.p12", NULL, NM_SETTING_802_1X_CK_SCHEME_PATH, NULL, NULL);
|
nm_setting_802_1x_set_private_key (s_8021x, TEST_CERT_DIR "/test-cert.p12", NULL, NM_SETTING_802_1X_CK_SCHEME_PATH, NULL, NULL);
|
||||||
|
|
||||||
/* IP4 setting */
|
/* IP4 setting */
|
||||||
s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
|
s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new ();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue