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 62fdb09f6..d6df2ff3c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -240,6 +240,10 @@ clean: regressclean
240 rm -f regress/unittests/hostkeys/test_hostkeys 240 rm -f regress/unittests/hostkeys/test_hostkeys
241 rm -f regress/unittests/kex/*.o 241 rm -f regress/unittests/kex/*.o
242 rm -f regress/unittests/kex/test_kex 242 rm -f regress/unittests/kex/test_kex
243 rm -f regress/unittests/match/*.o
244 rm -f regress/unittests/match/test_match
245 rm -f regress/unittests/utf8/*.o
246 rm -f regress/unittests/utf8/test_utf8
243 rm -f regress/misc/kexfuzz/*.o 247 rm -f regress/misc/kexfuzz/*.o
244 rm -f regress/misc/kexfuzz/kexfuzz 248 rm -f regress/misc/kexfuzz/kexfuzz
245 (cd openbsd-compat && $(MAKE) clean) 249 (cd openbsd-compat && $(MAKE) clean)
@@ -262,6 +266,10 @@ distclean: regressclean
262 rm -f regress/unittests/hostkeys/test_hostkeys 266 rm -f regress/unittests/hostkeys/test_hostkeys
263 rm -f regress/unittests/kex/*.o 267 rm -f regress/unittests/kex/*.o
264 rm -f regress/unittests/kex/test_kex 268 rm -f regress/unittests/kex/test_kex
269 rm -f regress/unittests/match/*.o
270 rm -f regress/unittests/match/test_match
271 rm -f regress/unittests/utf8/*.o
272 rm -f regress/unittests/utf8/test_utf8
265 rm -f regress/unittests/misc/kexfuzz 273 rm -f regress/unittests/misc/kexfuzz
266 (cd openbsd-compat && $(MAKE) distclean) 274 (cd openbsd-compat && $(MAKE) distclean)
267 if test -d pkg ; then \ 275 if test -d pkg ; then \
@@ -422,6 +430,10 @@ regress-prep:
422 mkdir -p `pwd`/regress/unittests/hostkeys 430 mkdir -p `pwd`/regress/unittests/hostkeys
423 [ -d `pwd`/regress/unittests/kex ] || \ 431 [ -d `pwd`/regress/unittests/kex ] || \
424 mkdir -p `pwd`/regress/unittests/kex 432 mkdir -p `pwd`/regress/unittests/kex
433 [ -d `pwd`/regress/unittests/match ] || \
434 mkdir -p `pwd`/regress/unittests/match
435 [ -d `pwd`/regress/unittests/utf8 ] || \
436 mkdir -p `pwd`/regress/unittests/utf8
425 [ -d `pwd`/regress/misc/kexfuzz ] || \ 437 [ -d `pwd`/regress/misc/kexfuzz ] || \
426 mkdir -p `pwd`/regress/misc/kexfuzz 438 mkdir -p `pwd`/regress/misc/kexfuzz
427 [ -f `pwd`/regress/Makefile ] || \ 439 [ -f `pwd`/regress/Makefile ] || \
@@ -512,6 +524,26 @@ regress/unittests/hostkeys/test_hostkeys$(EXEEXT): \
512 regress/unittests/test_helper/libtest_helper.a \ 524 regress/unittests/test_helper/libtest_helper.a \
513 -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) 525 -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
514 526
527UNITTESTS_TEST_MATCH_OBJS=\
528 regress/unittests/match/tests.o
529
530regress/unittests/match/test_match$(EXEEXT): \
531 ${UNITTESTS_TEST_MATCH_OBJS} \
532 regress/unittests/test_helper/libtest_helper.a libssh.a
533 $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_MATCH_OBJS) \
534 regress/unittests/test_helper/libtest_helper.a \
535 -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
536
537UNITTESTS_TEST_UTF8_OBJS=\
538 regress/unittests/utf8/tests.o
539
540regress/unittests/utf8/test_utf8$(EXEEXT): \
541 ${UNITTESTS_TEST_UTF8_OBJS} \
542 regress/unittests/test_helper/libtest_helper.a libssh.a
543 $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_UTF8_OBJS) \
544 regress/unittests/test_helper/libtest_helper.a \
545 -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
546
515MISC_KEX_FUZZ_OBJS=\ 547MISC_KEX_FUZZ_OBJS=\
516 regress/misc/kexfuzz/kexfuzz.o 548 regress/misc/kexfuzz/kexfuzz.o
517 549
@@ -528,6 +560,8 @@ regress-binaries: regress/modpipe$(EXEEXT) \
528 regress/unittests/bitmap/test_bitmap$(EXEEXT) \ 560 regress/unittests/bitmap/test_bitmap$(EXEEXT) \
529 regress/unittests/hostkeys/test_hostkeys$(EXEEXT) \ 561 regress/unittests/hostkeys/test_hostkeys$(EXEEXT) \
530 regress/unittests/kex/test_kex$(EXEEXT) \ 562 regress/unittests/kex/test_kex$(EXEEXT) \
563 regress/unittests/match/test_match$(EXEEXT) \
564 regress/unittests/utf8/test_utf8$(EXEEXT) \
531 regress/misc/kexfuzz/kexfuzz$(EXEEXT) 565 regress/misc/kexfuzz/kexfuzz$(EXEEXT)
532 566
533tests interop-tests t-exec: regress-prep regress-binaries $(TARGETS) 567tests interop-tests t-exec: regress-prep regress-binaries $(TARGETS)
diff --git a/regress/Makefile b/regress/Makefile
index 08fd82dbf..2910f13ab 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -222,4 +222,6 @@ unit:
222 $$V ${.OBJDIR}/unittests/kex/test_kex ; \ 222 $$V ${.OBJDIR}/unittests/kex/test_kex ; \
223 $$V ${.OBJDIR}/unittests/hostkeys/test_hostkeys \ 223 $$V ${.OBJDIR}/unittests/hostkeys/test_hostkeys \
224 -d ${.CURDIR}/unittests/hostkeys/testdata ; \ 224 -d ${.CURDIR}/unittests/hostkeys/testdata ; \
225 $$V ${.OBJDIR}/unittests/match/test_match ; \
226 $$V ${.OBJDIR}/unittests/utf8/test_utf8 ; \
225 fi 227 fi
diff --git a/regress/unittests/match/tests.c b/regress/unittests/match/tests.c
index aaca546bf..44b89a586 100644
--- a/regress/unittests/match/tests.c
+++ b/regress/unittests/match/tests.c
@@ -5,6 +5,8 @@
5 * Placed in the public domain 5 * Placed in the public domain
6 */ 6 */
7 7
8#include "includes.h"
9
8#include <sys/types.h> 10#include <sys/types.h>
9#include <sys/param.h> 11#include <sys/param.h>
10#include <stdio.h> 12#include <stdio.h>
@@ -12,7 +14,7 @@
12#include <stdlib.h> 14#include <stdlib.h>
13#include <string.h> 15#include <string.h>
14 16
15#include "test_helper.h" 17#include "../test_helper/test_helper.h"
16 18
17#include "match.h" 19#include "match.h"
18 20
diff --git a/regress/unittests/utf8/tests.c b/regress/unittests/utf8/tests.c
index fad2ec279..6d06fa182 100644
--- a/regress/unittests/utf8/tests.c
+++ b/regress/unittests/utf8/tests.c
@@ -6,10 +6,12 @@
6 * and placed in the public domain. 6 * and placed in the public domain.
7 */ 7 */
8 8
9#include "includes.h"
10
9#include <locale.h> 11#include <locale.h>
10#include <string.h> 12#include <string.h>
11 13
12#include "test_helper.h" 14#include "../test_helper/test_helper.h"
13 15
14#include "utf8.h" 16#include "utf8.h"
15 17