Split test targets further.

Splits test into file-tests, t-exec, unit and interop-tests and their
respective dependencies.  Should allow running any set individually
without having to build the other dependencies that are not needed
for that specific test.
This commit is contained in:
Darren Tucker 2019-07-24 14:21:19 +10:00
parent 520d4550a2
commit 159e987a54
2 changed files with 18 additions and 6 deletions

View File

@ -572,14 +572,14 @@ regress/misc/kexfuzz/kexfuzz$(EXEEXT): ${MISC_KEX_FUZZ_OBJS} libssh.a
$(LD) -o $@ $(LDFLAGS) $(MISC_KEX_FUZZ_OBJS) \ $(LD) -o $@ $(LDFLAGS) $(MISC_KEX_FUZZ_OBJS) \
-lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
regress-binaries: $(LIBCOMPAT) \ regress-binaries: regress-prep $(LIBCOMPAT) \
regress/modpipe$(EXEEXT) \ regress/modpipe$(EXEEXT) \
regress/setuid-allowed$(EXEEXT) \ regress/setuid-allowed$(EXEEXT) \
regress/netcat$(EXEEXT) \ regress/netcat$(EXEEXT) \
regress/check-perm$(EXEEXT) \ regress/check-perm$(EXEEXT) \
regress/mkdtemp$(EXEEXT) regress/mkdtemp$(EXEEXT)
regress-unit-binaries: $(REGRESSLIBS) \ regress-unit-binaries: regress-prep $(REGRESSLIBS) \
regress/unittests/sshbuf/test_sshbuf$(EXEEXT) \ regress/unittests/sshbuf/test_sshbuf$(EXEEXT) \
regress/unittests/sshkey/test_sshkey$(EXEEXT) \ regress/unittests/sshkey/test_sshkey$(EXEEXT) \
regress/unittests/bitmap/test_bitmap$(EXEEXT) \ regress/unittests/bitmap/test_bitmap$(EXEEXT) \
@ -590,9 +590,17 @@ regress-unit-binaries: $(REGRESSLIBS) \
regress/unittests/utf8/test_utf8$(EXEEXT) \ regress/unittests/utf8/test_utf8$(EXEEXT) \
regress/misc/kexfuzz/kexfuzz$(EXEEXT) regress/misc/kexfuzz/kexfuzz$(EXEEXT)
unit: regress-unit-binaries tests: file-tests t-exec interop-tests unit
tests interop-tests t-exec: unit regress-prep regress-binaries $(TARGETS) unit: regress-unit-binaries
BUILDDIR=`pwd`; \
cd $(srcdir)/regress || exit $$?; \
$(MAKE) \
.OBJDIR="$${BUILDDIR}/regress" \
.CURDIR="`pwd`" \
$@
interop-tests t-exec file-tests: regress-prep regress-binaries $(TARGETS)
BUILDDIR=`pwd`; \ BUILDDIR=`pwd`; \
TEST_SSH_SCP="$${BUILDDIR}/scp"; \ TEST_SSH_SCP="$${BUILDDIR}/scp"; \
TEST_SSH_SSH="$${BUILDDIR}/ssh"; \ TEST_SSH_SSH="$${BUILDDIR}/ssh"; \

View File

@ -1,7 +1,11 @@
# $OpenBSD: Makefile,v 1.103 2019/07/16 03:21:54 dtucker Exp $ # $OpenBSD: Makefile,v 1.103 2019/07/16 03:21:54 dtucker Exp $
REGRESS_TARGETS= unit t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t-exec tests: prep file-tests t-exec unit
tests: prep $(REGRESS_TARGETS)
REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12
# File based tests
file-tests: $(REGRESS_TARGETS)
# Interop tests are not run by default # Interop tests are not run by default
interop interop-tests: t-exec-interop interop interop-tests: t-exec-interop