From e7429f2be8643e1100380a8a7389d85cc286c8fe Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 15 May 2014 18:01:01 +1000 Subject: - (djm) [regress/Makefile Makefile.in] [regress/unittests/sshbuf/test_sshbuf.c [regress/unittests/sshbuf/test_sshbuf_fixed.c] [regress/unittests/sshbuf/test_sshbuf_fuzz.c] [regress/unittests/sshbuf/test_sshbuf_getput_basic.c] [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c] [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] [regress/unittests/sshbuf/test_sshbuf_misc.c] [regress/unittests/sshbuf/tests.c] [regress/unittests/test_helper/fuzz.c] [regress/unittests/test_helper/test_helper.c] Hook new unit tests into the build and "make tests" --- regress/Makefile | 6 +++++- regress/unittests/sshbuf/test_sshbuf.c | 6 ++++-- regress/unittests/sshbuf/test_sshbuf_fixed.c | 6 ++++-- regress/unittests/sshbuf/test_sshbuf_fuzz.c | 4 +++- regress/unittests/sshbuf/test_sshbuf_getput_basic.c | 4 +++- regress/unittests/sshbuf/test_sshbuf_getput_crypto.c | 4 +++- regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c | 4 +++- regress/unittests/sshbuf/test_sshbuf_misc.c | 4 +++- regress/unittests/sshbuf/tests.c | 2 +- regress/unittests/test_helper/fuzz.c | 2 ++ regress/unittests/test_helper/test_helper.c | 6 +++++- 11 files changed, 36 insertions(+), 12 deletions(-) (limited to 'regress') diff --git a/regress/Makefile b/regress/Makefile index 6e3b8d634..1e1f68dc3 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -1,6 +1,6 @@ # $OpenBSD: Makefile,v 1.68 2014/01/25 04:35:32 dtucker Exp $ -REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t-exec +REGRESS_TARGETS= unit t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t-exec tests: $(REGRESS_TARGETS) # Interop tests are not run by default @@ -180,3 +180,7 @@ t-exec-interop: ${INTEROP_TESTS:=.sh} # Not run by default interop: ${INTEROP_TARGETS} + +# Unit tests, built by top-level Makefile +unit: + ${.OBJDIR}/unittests/sshbuf/test_sshbuf diff --git a/regress/unittests/sshbuf/test_sshbuf.c b/regress/unittests/sshbuf/test_sshbuf.c index 834dcd050..85eacd66f 100644 --- a/regress/unittests/sshbuf/test_sshbuf.c +++ b/regress/unittests/sshbuf/test_sshbuf.c @@ -5,6 +5,9 @@ * Placed in the public domain */ +#define SSHBUF_INTERNAL 1 /* access internals for testing */ +#include "includes.h" + #include #include #include @@ -12,10 +15,9 @@ #include #include -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "ssherr.h" -#define SSHBUF_INTERNAL 1 /* access internals for testing */ #include "sshbuf.h" void sshbuf_tests(void); diff --git a/regress/unittests/sshbuf/test_sshbuf_fixed.c b/regress/unittests/sshbuf/test_sshbuf_fixed.c index 62c815a2e..52dc84b6f 100644 --- a/regress/unittests/sshbuf/test_sshbuf_fixed.c +++ b/regress/unittests/sshbuf/test_sshbuf_fixed.c @@ -5,6 +5,9 @@ * Placed in the public domain */ +#define SSHBUF_INTERNAL 1 /* access internals for testing */ +#include "includes.h" + #include #include #include @@ -12,9 +15,8 @@ #include #include -#include "test_helper.h" +#include "../test_helper/test_helper.h" -#define SSHBUF_INTERNAL 1 /* access internals for testing */ #include "sshbuf.h" #include "ssherr.h" diff --git a/regress/unittests/sshbuf/test_sshbuf_fuzz.c b/regress/unittests/sshbuf/test_sshbuf_fuzz.c index a014b048c..d902ac460 100644 --- a/regress/unittests/sshbuf/test_sshbuf_fuzz.c +++ b/regress/unittests/sshbuf/test_sshbuf_fuzz.c @@ -5,6 +5,8 @@ * Placed in the public domain */ +#include "includes.h" + #include #include #include @@ -12,7 +14,7 @@ #include #include -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "ssherr.h" #include "sshbuf.h" diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_basic.c b/regress/unittests/sshbuf/test_sshbuf_getput_basic.c index 2d469ec11..cf4d0a343 100644 --- a/regress/unittests/sshbuf/test_sshbuf_getput_basic.c +++ b/regress/unittests/sshbuf/test_sshbuf_getput_basic.c @@ -5,6 +5,8 @@ * Placed in the public domain */ +#include "includes.h" + #include #include #include @@ -12,7 +14,7 @@ #include #include -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "ssherr.h" #include "sshbuf.h" diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c b/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c index d7d4dc378..53290a64c 100644 --- a/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c +++ b/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c @@ -5,6 +5,8 @@ * Placed in the public domain */ +#include "includes.h" + #include #include #include @@ -16,7 +18,7 @@ #include #include -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "ssherr.h" #include "sshbuf.h" diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c b/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c index a382ee154..eed2d6025 100644 --- a/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c +++ b/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c @@ -5,6 +5,8 @@ * Placed in the public domain */ +#include "includes.h" + #include #include #include @@ -16,7 +18,7 @@ #include #include -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "ssherr.h" #include "sshbuf.h" diff --git a/regress/unittests/sshbuf/test_sshbuf_misc.c b/regress/unittests/sshbuf/test_sshbuf_misc.c index a5b1ab2c9..a47f9f0bf 100644 --- a/regress/unittests/sshbuf/test_sshbuf_misc.c +++ b/regress/unittests/sshbuf/test_sshbuf_misc.c @@ -5,6 +5,8 @@ * Placed in the public domain */ +#include "includes.h" + #include #include #include @@ -12,7 +14,7 @@ #include #include -#include "test_helper.h" +#include "../test_helper/test_helper.h" #include "sshbuf.h" diff --git a/regress/unittests/sshbuf/tests.c b/regress/unittests/sshbuf/tests.c index 8397e4011..1557e4342 100644 --- a/regress/unittests/sshbuf/tests.c +++ b/regress/unittests/sshbuf/tests.c @@ -5,7 +5,7 @@ * Placed in the public domain */ -#include "test_helper.h" +#include "../test_helper/test_helper.h" void sshbuf_tests(void); void sshbuf_getput_basic_tests(void); diff --git a/regress/unittests/test_helper/fuzz.c b/regress/unittests/test_helper/fuzz.c index b64af24ed..63b2370d2 100644 --- a/regress/unittests/test_helper/fuzz.c +++ b/regress/unittests/test_helper/fuzz.c @@ -17,6 +17,8 @@ /* Utility functions/framework for fuzz tests */ +#include "includes.h" + #include #include diff --git a/regress/unittests/test_helper/test_helper.c b/regress/unittests/test_helper/test_helper.c index 8f0bbdec9..5881538ee 100644 --- a/regress/unittests/test_helper/test_helper.c +++ b/regress/unittests/test_helper/test_helper.c @@ -17,6 +17,8 @@ /* Utility functions/framework for regress tests */ +#include "includes.h" + #include #include @@ -30,7 +32,9 @@ #include -#include +#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS) +# include +#endif #include "test_helper.h" -- cgit v1.2.3