diff options
author | Damien Miller <djm@mindrot.org> | 2014-05-15 18:01:01 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-05-15 18:01:01 +1000 |
commit | e7429f2be8643e1100380a8a7389d85cc286c8fe (patch) | |
tree | 1d4b68573fb31a573907aef5cb9dcab57b2db333 /regress | |
parent | def1de086707b0e6b046fe7e115c60aca0227a99 (diff) | |
download | openssh-git-e7429f2be8643e1100380a8a7389d85cc286c8fe.tar.gz |
- (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"
Diffstat (limited to 'regress')
-rw-r--r-- | regress/Makefile | 6 | ||||
-rw-r--r-- | regress/unittests/sshbuf/test_sshbuf.c | 6 | ||||
-rw-r--r-- | regress/unittests/sshbuf/test_sshbuf_fixed.c | 6 | ||||
-rw-r--r-- | regress/unittests/sshbuf/test_sshbuf_fuzz.c | 4 | ||||
-rw-r--r-- | regress/unittests/sshbuf/test_sshbuf_getput_basic.c | 4 | ||||
-rw-r--r-- | regress/unittests/sshbuf/test_sshbuf_getput_crypto.c | 4 | ||||
-rw-r--r-- | regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c | 4 | ||||
-rw-r--r-- | regress/unittests/sshbuf/test_sshbuf_misc.c | 4 | ||||
-rw-r--r-- | regress/unittests/sshbuf/tests.c | 2 | ||||
-rw-r--r-- | regress/unittests/test_helper/fuzz.c | 2 | ||||
-rw-r--r-- | regress/unittests/test_helper/test_helper.c | 6 |
11 files changed, 36 insertions, 12 deletions
diff --git a/regress/Makefile b/regress/Makefile index 6e3b8d63..1e1f68dc 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 834dcd05..85eacd66 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 <sys/types.h> #include <sys/param.h> #include <stdio.h> @@ -12,10 +15,9 @@ #include <stdlib.h> #include <string.h> -#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 62c815a2..52dc84b6 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 <sys/types.h> #include <sys/param.h> #include <stdio.h> @@ -12,9 +15,8 @@ #include <stdlib.h> #include <string.h> -#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 a014b048..d902ac46 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 <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 "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 2d469ec1..cf4d0a34 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 <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 "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 d7d4dc37..53290a64 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 <sys/types.h> #include <sys/param.h> #include <stdio.h> @@ -16,7 +18,7 @@ #include <openssl/ec.h> #include <openssl/objects.h> -#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 a382ee15..eed2d602 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 <sys/types.h> #include <sys/param.h> #include <stdio.h> @@ -16,7 +18,7 @@ #include <openssl/ec.h> #include <openssl/objects.h> -#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 a5b1ab2c..a47f9f0b 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 <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 "sshbuf.h" diff --git a/regress/unittests/sshbuf/tests.c b/regress/unittests/sshbuf/tests.c index 8397e401..1557e434 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 b64af24e..63b2370d 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 <sys/types.h> #include <assert.h> diff --git a/regress/unittests/test_helper/test_helper.c b/regress/unittests/test_helper/test_helper.c index 8f0bbdec..5881538e 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 <sys/types.h> #include <sys/param.h> @@ -30,7 +32,9 @@ #include <openssl/bn.h> -#include <vis.h> +#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS) +# include <vis.h> +#endif #include "test_helper.h" |