mirror of git://anongit.mindrot.org/openssh.git
- (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"
This commit is contained in:
parent
def1de0867
commit
e7429f2be8
12
ChangeLog
12
ChangeLog
|
@ -127,6 +127,18 @@
|
|||
[regress/unittests/test_helper/test_helper.c]
|
||||
[regress/unittests/test_helper/test_helper.h]
|
||||
Import new unit tests from OpenBSD; not yet hooked up to build.
|
||||
- (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"
|
||||
|
||||
20140430
|
||||
- (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already
|
||||
|
|
55
Makefile.in
55
Makefile.in
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile.in,v 1.357 2014/05/15 04:58:08 djm Exp $
|
||||
# $Id: Makefile.in,v 1.358 2014/05/15 08:01:01 djm Exp $
|
||||
|
||||
# uncomment if you run a non bourne compatable shell. Ie. csh
|
||||
#SHELL = @SH@
|
||||
|
@ -143,7 +143,7 @@ $(SSHOBJS): Makefile.in config.h
|
|||
$(SSHDOBJS): Makefile.in config.h
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
|
||||
$(LIBCOMPAT): always
|
||||
|
@ -222,6 +222,10 @@ umac128.o: umac.c
|
|||
clean: regressclean
|
||||
rm -f *.o *.a $(TARGETS) logintest config.cache config.log
|
||||
rm -f *.out core survey
|
||||
rm -f regress/unittests/test_helper/*.a
|
||||
rm -f regress/unittests/test_helper/*.o
|
||||
rm -f regress/unittests/sshbuf/*.o
|
||||
rm -f regress/unittests/sshbuf/test_sshbuf
|
||||
(cd openbsd-compat && $(MAKE) clean)
|
||||
|
||||
distclean: regressclean
|
||||
|
@ -230,6 +234,10 @@ distclean: regressclean
|
|||
rm -f Makefile buildpkg.sh config.h config.status
|
||||
rm -f survey.sh openbsd-compat/regress/Makefile *~
|
||||
rm -rf autom4te.cache
|
||||
rm -f regress/unittests/test_helper/*.a
|
||||
rm -f regress/unittests/test_helper/*.o
|
||||
rm -f regress/unittests/sshbuf/*.o
|
||||
rm -f regress/unittests/sshbuf/test_sshbuf
|
||||
(cd openbsd-compat && $(MAKE) distclean)
|
||||
if test -d pkg ; then \
|
||||
rm -fr pkg ; \
|
||||
|
@ -402,21 +410,54 @@ uninstall:
|
|||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
|
||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
||||
|
||||
regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c
|
||||
regress-prep:
|
||||
[ -d `pwd`/regress ] || mkdir -p `pwd`/regress
|
||||
[ -d `pwd`/regress/unitests ] || mkdir -p `pwd`/regress/unitests
|
||||
[ -d `pwd`/regress/unitests/test_helper ] || \
|
||||
mkdir -p `pwd`/regress/unitests/test_helper
|
||||
[ -d `pwd`/regress/unitests/sshbuf ] || \
|
||||
mkdir -p `pwd`/regress/unitests/sshbuf
|
||||
[ -f `pwd`/regress/Makefile ] || \
|
||||
ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile
|
||||
|
||||
regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
|
||||
$(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
regress/setuid-allowed$(EXEEXT): $(srcdir)/regress/setuid-allowed.c
|
||||
[ -d `pwd`/regress ] || mkdir -p `pwd`/regress
|
||||
[ -f `pwd`/regress/Makefile ] || \
|
||||
ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
|
||||
$(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
tests interop-tests: $(TARGETS) regress/modpipe$(EXEEXT) regress/setuid-allowed$(EXEEXT)
|
||||
UNITTESTS_TEST_HELPER_OBJS=\
|
||||
regress/unittests/test_helper/test_helper.o \
|
||||
regress/unittests/test_helper/fuzz.o
|
||||
|
||||
regress/unittests/test_helper/libtest_helper.a: ${UNITTESTS_TEST_HELPER_OBJS}
|
||||
$(AR) rv $@ $(UNITTESTS_TEST_HELPER_OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
UNITTESTS_TEST_SSHBUF_OBJS=\
|
||||
regress/unittests/sshbuf/tests.o \
|
||||
regress/unittests/sshbuf/test_sshbuf.o \
|
||||
regress/unittests/sshbuf/test_sshbuf_getput_basic.o \
|
||||
regress/unittests/sshbuf/test_sshbuf_getput_crypto.o \
|
||||
regress/unittests/sshbuf/test_sshbuf_misc.o \
|
||||
regress/unittests/sshbuf/test_sshbuf_fuzz.o \
|
||||
regress/unittests/sshbuf/test_sshbuf_getput_fuzz.o \
|
||||
regress/unittests/sshbuf/test_sshbuf_fixed.o
|
||||
|
||||
regress/unittests/sshbuf/test_sshbuf$(EXEEXT): ${UNITTESTS_TEST_SSHBUF_OBJS} \
|
||||
regress/unittests/test_helper/libtest_helper.a
|
||||
$(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_SSHBUF_OBJS) \
|
||||
-L regress/unittests/test_helper -ltest_helper \
|
||||
-lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
|
||||
|
||||
REGRESS_BINARIES=\
|
||||
regress/modpipe$(EXEEXT) \
|
||||
regress/setuid-allowed$(EXEEXT) \
|
||||
regress/unittests/sshbuf/test_sshbuf$(EXEEXT)
|
||||
|
||||
tests interop-tests: regress-prep $(TARGETS) $(REGRESS_BINARIES)
|
||||
BUILDDIR=`pwd`; \
|
||||
TEST_SHELL="@TEST_SHELL@"; \
|
||||
TEST_SSH_SCP="$${BUILDDIR}/scp"; \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
/* Utility functions/framework for fuzz tests */
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue