[openssh-commits] [openssh] 01/01: hook up hostkeys unittest to portable Makefiles

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Feb 17 10:05:16 AEDT 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit e89c780886b23600de1e1c8d74aabd1ff61f43f0
Author: Damien Miller <djm at google.com>
Date:   Tue Feb 17 10:04:55 2015 +1100

    hook up hostkeys unittest to portable Makefiles
---
 Makefile.in                               | 16 ++++++++++++++++
 regress/Makefile                          |  4 +++-
 regress/unittests/hostkeys/test_iterate.c |  2 +-
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 5119d6a..c878315 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -236,6 +236,8 @@ clean:	regressclean
 	rm -f regress/unittests/sshkey/test_sshkey
 	rm -f regress/unittests/bitmap/*.o
 	rm -f regress/unittests/bitmap/test_bitmap
+	rm -f regress/unittests/hostkeys/*.o
+	rm -f regress/unittests/hostkeys/test_hostkeys
 	rm -f regress/unittests/kex/*.o
 	rm -f regress/unittests/kex/test_kex
 	(cd openbsd-compat && $(MAKE) clean)
@@ -254,6 +256,8 @@ distclean:	regressclean
 	rm -f regress/unittests/sshkey/test_sshkey
 	rm -f regress/unittests/bitmap/*.o
 	rm -f regress/unittests/bitmap/test_bitmap
+	rm -f regress/unittests/hostkeys/*.o
+	rm -f regress/unittests/hostkeys/test_hostkeys
 	rm -f regress/unittests/kex/*.o
 	rm -f regress/unittests/kex/test_kex
 	(cd openbsd-compat && $(MAKE) distclean)
@@ -509,6 +513,17 @@ regress/unittests/kex/test_kex$(EXEEXT): ${UNITTESTS_TEST_KEX_OBJS} \
 	    regress/unittests/test_helper/libtest_helper.a \
 	    -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
 
+UNITTESTS_TEST_HOSTKEYS_OBJS=\
+	regress/unittests/hostkeys/tests.o \
+	regress/unittests/hostkeys/test_iterate.o
+
+regress/unittests/hostkeys/test_hostkeys$(EXEEXT): \
+    ${UNITTESTS_TEST_HOSTKEYS_OBJS} \
+    regress/unittests/test_helper/libtest_helper.a libssh.a
+	$(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_HOSTKEYS_OBJS) \
+	    regress/unittests/test_helper/libtest_helper.a \
+	    -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
+
 REGRESS_BINARIES=\
 	regress/modpipe$(EXEEXT) \
 	regress/setuid-allowed$(EXEEXT) \
@@ -516,6 +531,7 @@ REGRESS_BINARIES=\
 	regress/unittests/sshbuf/test_sshbuf$(EXEEXT) \
 	regress/unittests/sshkey/test_sshkey$(EXEEXT) \
 	regress/unittests/bitmap/test_bitmap$(EXEEXT) \
+	regress/unittests/hostkeys/test_hostkeys$(EXEEXT) \
 	regress/unittests/kex/test_kex$(EXEEXT)
 
 tests interop-tests t-exec: regress-prep $(TARGETS) $(REGRESS_BINARIES)
diff --git a/regress/Makefile b/regress/Makefile
index b30a713..a5eaa09 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -205,7 +205,9 @@ unit:
 	set -e ; if test -z "${SKIP_UNIT}" ; then \
 		${.OBJDIR}/unittests/sshbuf/test_sshbuf ; \
 		${.OBJDIR}/unittests/sshkey/test_sshkey \
-			-d  ${.CURDIR}//unittests/sshkey/testdata ; \
+			-d ${.CURDIR}/unittests/sshkey/testdata ; \
 		${.OBJDIR}/unittests/bitmap/test_bitmap ; \
 		${.OBJDIR}/unittests/kex/test_kex ; \
+		${.OBJDIR}/unittests/hostkeys/test_hostkeys \
+			-d ${.CURDIR}/unittests/hostkeys/testdata ; \
 	fi
diff --git a/regress/unittests/hostkeys/test_iterate.c b/regress/unittests/hostkeys/test_iterate.c
index 92d3a83..c681f19 100644
--- a/regress/unittests/hostkeys/test_iterate.c
+++ b/regress/unittests/hostkeys/test_iterate.c
@@ -12,7 +12,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "test_helper.h"
+#include "../test_helper/test_helper.h"
 
 #include "sshkey.h"
 #include "authfile.h"

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list