diff mbox series

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

Message ID 20180306110100.9008-1-aserdean@ovn.org
State Accepted
Headers show
Series [ovs-dev] tests-windows: Add OpenSSL directory to autotest path | expand

Commit Message

Alin-Gabriel Serdean March 6, 2018, 11:01 a.m. UTC
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@ovn.org>
---
 m4/ax_check_openssl.m4 | 4 ++++
 tests/automake.mk      | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

Comments

Ben Pfaff March 8, 2018, 1:09 a.m. UTC | #1
On Tue, Mar 06, 2018 at 01:01:00PM +0200, Alin Gabriel Serdean wrote:
> 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@ovn.org>

Acked-by: Ben Pfaff <blp@ovn.org>
Alin-Gabriel Serdean March 8, 2018, 2:41 a.m. UTC | #2
Thanks for the review! Applied on master.

Alin.

> -----Mesaj original-----
> De la: ovs-dev-bounces@openvswitch.org <ovs-dev-
> bounces@openvswitch.org> În numele Ben Pfaff
> Trimis: Thursday, March 8, 2018 3:09 AM
> Către: Alin Gabriel Serdean <aserdean@ovn.org>
> Cc: dev@openvswitch.org
> Subiect: Re: [ovs-dev] [PATCH] tests-windows: Add OpenSSL directory to
> autotest path
> 
> On Tue, Mar 06, 2018 at 01:01:00PM +0200, Alin Gabriel Serdean wrote:
> > 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@ovn.org>
> 
> Acked-by: Ben Pfaff <blp@ovn.org>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox series

Patch

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); \