|
Packit |
fcad23 |
#
|
|
Packit |
fcad23 |
# Makefile for testing
|
|
Packit |
fcad23 |
#
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
# use GNU vpath, if available, to only set a path for source and headers
|
|
Packit |
fcad23 |
# VPATH will pick up objects too, which is bad if you are sharing a
|
|
Packit |
fcad23 |
# source dir...
|
|
Packit |
fcad23 |
@GNU_vpath@ %.h $(srcdir)
|
|
Packit |
fcad23 |
@GNU_vpath@ %.c $(srcdir)
|
|
Packit |
fcad23 |
# fallback to regular VPATH for non-gnu...
|
|
Packit |
fcad23 |
@NON_GNU_VPATH@ $(srcdir)
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
USELIBS = ../snmplib/libsnmp.$(LIB_EXTENSION)$(LIB_VERSION)
|
|
Packit |
fcad23 |
LIBS = -L../snmplib $(CC_RUNTIME_ARG) -lsnmp @LIBS@
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
PARSEOBJS =
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
CPPFLAGS = $(SNMPLIB_INCLUDES) @CPPFLAGS@
|
|
Packit |
fcad23 |
CC = @CC@ $(CPPFLAGS)
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
all:
|
|
Packit |
fcad23 |
@echo "Select one of the following targets to run:"
|
|
Packit |
fcad23 |
@echo ""
|
|
Packit |
fcad23 |
@echo " make test -- default test suites"
|
|
Packit |
fcad23 |
@echo " make testall -- Run all available tests"
|
|
Packit |
fcad23 |
@echo " make testfailed -- Run only the tests that failed last time."
|
|
Packit |
fcad23 |
@echo " make testsimple -- Run tests directly with simple_run"
|
|
Packit |
fcad23 |
@echo ""
|
|
Packit |
fcad23 |
@echo "Set additional test parameters with TESTOPTS=args"
|
|
Packit |
fcad23 |
@echo ""
|
|
Packit |
fcad23 |
@echo "Also see the RUNFULLTESTS script for details"
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
test:
|
|
Packit |
fcad23 |
@$(srcdir)/check_for_pskill
|
|
Packit |
fcad23 |
@if test "x$(PERL)" = "x" \
|
|
Packit |
fcad23 |
-o "x@PERL_SYSTEM_INVOKES_POSIX_SHELL@" != xyes \
|
|
Packit |
fcad23 |
|| { ! $(PERL) -e 'require TAP::Harness;' >/dev/null 2>&1 \
|
|
Packit |
fcad23 |
&& ! $(PERL) -e 'require Test::Harness; die if $$Test::Harness::VERSION < 1.21;' >/dev/null 2>&1; };\
|
|
Packit |
fcad23 |
then \
|
|
Packit |
fcad23 |
echo $(srcdir)/RUNTESTS ; \
|
|
Packit |
fcad23 |
$(srcdir)/RUNTESTS ; \
|
|
Packit |
fcad23 |
else \
|
|
Packit |
fcad23 |
echo $(srcdir)/RUNFULLTESTS $(TESTOPTS) ; \
|
|
Packit |
fcad23 |
$(PERL) $(srcdir)/RUNFULLTESTS $(TESTOPTS) ; \
|
|
Packit |
fcad23 |
fi
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
testsimple:
|
|
Packit |
fcad23 |
@(export srcdir=$(top_srcdir) ; \
|
|
Packit |
fcad23 |
export builddir=$(top_builddir) ; \
|
|
Packit |
fcad23 |
$(srcdir)/fulltests/support/simple_run $(TESTOPTS) \
|
|
Packit |
fcad23 |
)
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
testall:
|
|
Packit |
fcad23 |
$(srcdir)/RUNFULLTESTS -g all $(TESTOPTS)
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
testfailed:
|
|
Packit |
fcad23 |
$(srcdir)/RUNFULLTESTS -f $(TESTOPTS)
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
test-mibs:
|
|
Packit |
fcad23 |
cd $(srcdir)/rfc1213 ; ./run
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
etest: etimetest.o $(PARSEOBJS) $(USELIBS)
|
|
Packit |
fcad23 |
${CC} -o $@ etimetest.o $(PARSEOBJS) ${LDFLAGS} ${LIBS}
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
ktest: keymanagetest.o $(PARSEOBJS) $(USELIBS)
|
|
Packit |
fcad23 |
${CC} -o $@ keymanagetest.o $(PARSEOBJS) ${LDFLAGS} ${LIBS}
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
misctest: misctest.o $(PARSEOBJS) $(USELIBS)
|
|
Packit |
fcad23 |
${CC} -o $@ misctest.o $(PARSEOBJS) ${LDFLAGS} ${LIBS}
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
stest: scapitest.o $(PARSEOBJS) $(USELIBS)
|
|
Packit |
fcad23 |
${CC} -o $@ scapitest.o $(PARSEOBJS) ${LDFLAGS} ${LIBS}
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
clean: testclean
|
|
Packit |
fcad23 |
rm -f *.o core *.core $(TARG)
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
testclean:
|
|
Packit |
fcad23 |
-rm -fr /tmp/snmp-test*
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
install: installdirs $(TARG)
|
|
Packit |
fcad23 |
@for i in $(TARG) ; \
|
|
Packit |
fcad23 |
do $(INSTALL) $$i $(INSTALL_PREFIX)$(bindir) ; \
|
|
Packit |
fcad23 |
echo "install: installed $$i in $(INSTALL_PREFIX)$(bindir)" ; \
|
|
Packit |
fcad23 |
done
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
installdirs:
|
|
Packit |
fcad23 |
@$(SHELL) $(srcdir)/../mkinstalldirs $(INSTALL_PREFIX)$(snmplibdir) $(INSTALL_PREFIX)$(bindir)
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
dependlocal:
|
|
Packit |
fcad23 |
makedepend $(CPPFLAGS) -o.lo $(srcdir)/*.c
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
depend: dependlocal
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
nosysdepend:
|
|
Packit |
fcad23 |
makedepend $(CPPFLAGS) -o.lo *.c
|
|
Packit |
fcad23 |
$(PERL) -n -i.bak $(top_srcdir)/makenosysdepend.pl Makefile
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
makefileindepend: nosysdepend
|
|
Packit |
fcad23 |
$(PERL) $(top_srcdir)/makefileindepend.pl
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
|
|
Packit |
fcad23 |
etimetest.lo: ../config.h ../m/generic.h ../s/generic.h ../s/linux.h
|
|
Packit |
fcad23 |
etimetest.lo: ../snmplib/asn1.h ../snmplib/callback.h ../snmplib/lcd_time.h
|
|
Packit |
fcad23 |
etimetest.lo: ../snmplib/snmp_api.h ../snmplib/snmp_debug.h ../snmplib/tools.h
|
|
Packit |
fcad23 |
etimetest.lo: ../s/sysv.h
|
|
Packit |
fcad23 |
keymanagetest.lo: ../config.h ../m/generic.h ../s/generic.h ../s/linux.h
|
|
Packit |
fcad23 |
keymanagetest.lo: ../snmplib/asn1.h ../snmplib/callback.h ../snmplib/keytools.h
|
|
Packit |
fcad23 |
keymanagetest.lo: ../snmplib/scapi.h ../snmplib/snmp_api.h ../snmplib/tools.h
|
|
Packit |
fcad23 |
keymanagetest.lo: ../snmplib/transform_oids.h ../s/sysv.h
|
|
Packit |
fcad23 |
misctest.lo: ../config.h ../m/generic.h ../s/generic.h ../s/linux.h
|
|
Packit |
fcad23 |
misctest.lo: ../snmplib/asn1.h ../snmplib/callback.h ../snmplib/snmp_api.h
|
|
Packit |
fcad23 |
misctest.lo: ../snmplib/tools.h ../snmplib/transform_oids.h ../s/sysv.h
|
|
Packit |
fcad23 |
scapitest.lo: ../config.h ../m/generic.h ../s/generic.h ../s/linux.h
|
|
Packit |
fcad23 |
scapitest.lo: ../snmplib/asn1.h ../snmplib/callback.h ../snmplib/keytools.h
|
|
Packit |
fcad23 |
scapitest.lo: ../snmplib/scapi.h ../snmplib/snmp_api.h ../snmplib/tools.h
|
|
Packit |
fcad23 |
scapitest.lo: ../snmplib/transform_oids.h ../s/sysv.h
|
|
Packit |
fcad23 |
T.lo: ../config.h ../m/generic.h ../s/generic.h ../s/linux.h ../s/sysv.h
|