summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2016-08-23 16:33:48 +1000
committerDamien Miller <djm@mindrot.org>2016-08-23 16:33:48 +1000
commit6ee4f1c01ee31e65245881d49d4bccf014956066 (patch)
tree2ad8d3a50f5dbff0edccf5778eb0aee8e3763d3c
parent114efe2bc0dd2842d997940a833f115e6fc04854 (diff)
hook match and utf8 unittests up to Makefile
-rw-r--r--Makefile.in34
-rw-r--r--regress/Makefile2
-rw-r--r--regress/unittests/match/tests.c4
-rw-r--r--regress/unittests/utf8/tests.c4
4 files changed, 42 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index 62fdb09f..d6df2ff3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -240,6 +240,10 @@ clean: regressclean
rm -f regress/unittests/hostkeys/test_hostkeys
rm -f regress/unittests/kex/*.o
rm -f regress/unittests/kex/test_kex
+ rm -f regress/unittests/match/*.o
+ rm -f regress/unittests/match/test_match
+ rm -f regress/unittests/utf8/*.o
+ rm -f regress/unittests/utf8/test_utf8
rm -f regress/misc/kexfuzz/*.o
rm -f regress/misc/kexfuzz/kexfuzz
(cd openbsd-compat && $(MAKE) clean)
@@ -262,6 +266,10 @@ distclean: regressclean
rm -f regress/unittests/hostkeys/test_hostkeys
rm -f regress/unittests/kex/*.o
rm -f regress/unittests/kex/test_kex
+ rm -f regress/unittests/match/*.o
+ rm -f regress/unittests/match/test_match
+ rm -f regress/unittests/utf8/*.o
+ rm -f regress/unittests/utf8/test_utf8
rm -f regress/unittests/misc/kexfuzz
(cd openbsd-compat && $(MAKE) distclean)
if test -d pkg ; then \
@@ -422,6 +430,10 @@ regress-prep:
mkdir -p `pwd`/regress/unittests/hostkeys
[ -d `pwd`/regress/unittests/kex ] || \
mkdir -p `pwd`/regress/unittests/kex
+ [ -d `pwd`/regress/unittests/match ] || \
+ mkdir -p `pwd`/regress/unittests/match
+ [ -d `pwd`/regress/unittests/utf8 ] || \
+ mkdir -p `pwd`/regress/unittests/utf8
[ -d `pwd`/regress/misc/kexfuzz ] || \
mkdir -p `pwd`/regress/misc/kexfuzz
[ -f `pwd`/regress/Makefile ] || \
@@ -512,6 +524,26 @@ regress/unittests/hostkeys/test_hostkeys$(EXEEXT): \
regress/unittests/test_helper/libtest_helper.a \
-lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
+UNITTESTS_TEST_MATCH_OBJS=\
+ regress/unittests/match/tests.o
+
+regress/unittests/match/test_match$(EXEEXT): \
+ ${UNITTESTS_TEST_MATCH_OBJS} \
+ regress/unittests/test_helper/libtest_helper.a libssh.a
+ $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_MATCH_OBJS) \
+ regress/unittests/test_helper/libtest_helper.a \
+ -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
+
+UNITTESTS_TEST_UTF8_OBJS=\
+ regress/unittests/utf8/tests.o
+
+regress/unittests/utf8/test_utf8$(EXEEXT): \
+ ${UNITTESTS_TEST_UTF8_OBJS} \
+ regress/unittests/test_helper/libtest_helper.a libssh.a
+ $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_UTF8_OBJS) \
+ regress/unittests/test_helper/libtest_helper.a \
+ -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
+
MISC_KEX_FUZZ_OBJS=\
regress/misc/kexfuzz/kexfuzz.o
@@ -528,6 +560,8 @@ regress-binaries: regress/modpipe$(EXEEXT) \
regress/unittests/bitmap/test_bitmap$(EXEEXT) \
regress/unittests/hostkeys/test_hostkeys$(EXEEXT) \
regress/unittests/kex/test_kex$(EXEEXT) \
+ regress/unittests/match/test_match$(EXEEXT) \
+ regress/unittests/utf8/test_utf8$(EXEEXT) \
regress/misc/kexfuzz/kexfuzz$(EXEEXT)
tests interop-tests t-exec: regress-prep regress-binaries $(TARGETS)
diff --git a/regress/Makefile b/regress/Makefile
index 08fd82db..2910f13a 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -222,4 +222,6 @@ unit:
$$V ${.OBJDIR}/unittests/kex/test_kex ; \
$$V ${.OBJDIR}/unittests/hostkeys/test_hostkeys \
-d ${.CURDIR}/unittests/hostkeys/testdata ; \
+ $$V ${.OBJDIR}/unittests/match/test_match ; \
+ $$V ${.OBJDIR}/unittests/utf8/test_utf8 ; \
fi
diff --git a/regress/unittests/match/tests.c b/regress/unittests/match/tests.c
index aaca546b..44b89a58 100644
--- a/regress/unittests/match/tests.c
+++ b/regress/unittests/match/tests.c
@@ -5,6 +5,8 @@
* Placed in the public domain
*/
+#include "includes.h"
+
#include <sys/types.h>
#include <sys/param.h>
#include <stdio.h>
@@ -12,7 +14,7 @@
#include <stdlib.h>
#include <string.h>
-#include "test_helper.h"
+#include "../test_helper/test_helper.h"
#include "match.h"
diff --git a/regress/unittests/utf8/tests.c b/regress/unittests/utf8/tests.c
index fad2ec27..6d06fa18 100644
--- a/regress/unittests/utf8/tests.c
+++ b/regress/unittests/utf8/tests.c
@@ -6,10 +6,12 @@
* and placed in the public domain.
*/
+#include "includes.h"
+
#include <locale.h>
#include <string.h>
-#include "test_helper.h"
+#include "../test_helper/test_helper.h"
#include "utf8.h"