From e89c780886b23600de1e1c8d74aabd1ff61f43f0 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 17 Feb 2015 10:04:55 +1100 Subject: [PATCH] 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 5119d6a30..c8783156e 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 b30a7133b..a5eaa0997 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 92d3a8345..c681f19f3 100644 --- a/regress/unittests/hostkeys/test_iterate.c +++ b/regress/unittests/hostkeys/test_iterate.c @@ -12,7 +12,7 @@ #include #include -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "sshkey.h" #include "authfile.h"