[ovs-dev] [PATCH] tests-windows: Add OpenSSL directory to autotest path

Alin Gabriel Serdean aserdean at ovn.org
Tue Mar 6 11:01:00 UTC 2018


Running OpenSSL unit tests without it already being included in library path
revealed a problem: the AUTOTEST_PATH does not include it.

This patch adds a new variable `SSL_DIR` which will be added in AUTOTEST_PATH.

Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>
---
 m4/ax_check_openssl.m4 | 4 ++++
 tests/automake.mk      | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/m4/ax_check_openssl.m4 b/m4/ax_check_openssl.m4
index 7846fb071..281d4dc65 100644
--- a/m4/ax_check_openssl.m4
+++ b/m4/ax_check_openssl.m4
@@ -14,6 +14,7 @@
 #     SSL_INCLUDES to the include directives required
 #     SSL_LIBS to the -l directives required
 #     SSL_LDFLAGS to the -L or -R flags required
+#     SSL_DIR to add it to various paths
 #
 #   and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately
 #
@@ -81,8 +82,10 @@ AC_DEFUN([AX_CHECK_OPENSSL], [
                 SSL_LDFLAGS="-L$ssldir/lib"
                 if test "$WIN32" = "yes"; then
                     SSL_LIBS="-lssleay32 -llibeay32"
+                    SSL_DIR=/$(echo ${ssldir} | ${SED} -e 's/://')
                 else
                     SSL_LIBS="-lssl -lcrypto"
+                    SSL_DIR="$ssldir"
                 fi
                 found=true
                 AC_MSG_RESULT([yes])
@@ -126,4 +129,5 @@ AC_DEFUN([AX_CHECK_OPENSSL], [
     AC_SUBST([SSL_INCLUDES])
     AC_SUBST([SSL_LIBS])
     AC_SUBST([SSL_LDFLAGS])
+    AC_SUBST([SSL_DIR])
 ])
diff --git a/tests/automake.mk b/tests/automake.mk
index 18698ebc3..160908d05 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -136,7 +136,7 @@ SYSTEM_USERSPACE_TESTSUITE = $(srcdir)/tests/system-userspace-testsuite
 SYSTEM_OFFLOADS_TESTSUITE = $(srcdir)/tests/system-offloads-testsuite
 DISTCLEANFILES += tests/atconfig tests/atlocal
 
-AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep:tests:$(PTHREAD_WIN32_DIR_DLL):ovn/controller-vtep:ovn/northd:ovn/utilities:ovn/controller
+AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep:tests:$(PTHREAD_WIN32_DIR_DLL):$(SSL_DIR):ovn/controller-vtep:ovn/northd:ovn/utilities:ovn/controller
 
 check-local:
 	set $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS); \
-- 
2.16.1.windows.1



More information about the dev mailing list