]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
hook match and utf8 unittests up to Makefile
authorDamien Miller <djm@mindrot.org>
Tue, 23 Aug 2016 06:33:48 +0000 (16:33 +1000)
committerDamien Miller <djm@mindrot.org>
Tue, 23 Aug 2016 06:33:48 +0000 (16:33 +1000)
Makefile.in
regress/Makefile
regress/unittests/match/tests.c
regress/unittests/utf8/tests.c

index 62fdb09f6d4bdc6e3e5fdd7923d4fb796fab94a0..d6df2ff3ce9c37970a669641b9e6a010bd478bfe 100644 (file)
@@ -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)
index 08fd82dbfaa115dc206dcf9b0594ac9b3175d131..2910f13abc660bb1c224f747e88eb2aa59809939 100644 (file)
@@ -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
index aaca546bf9c6333240df7a361fda0ce8b332b7c6..44b89a586c33a1ce63e0f3193265f282e2839419 100644 (file)
@@ -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"
 
index fad2ec279441318f771f5f7b47563fa84349da96..6d06fa1822da9af188787494d328673c058152c2 100644 (file)
@@ -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"