diff --git a/documentation/Makefile b/documentation/Makefile index b2645404f8da297d6953115777a49bf403ea038e..0606fd904983c965505a76bfc39b909eec8a7e50 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -44,6 +44,8 @@ help: realclean clean: -rm -rf $(BUILDDIR) +runtests: + html: bnf.inc $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html diff --git a/test/validate/Makefile b/test/validate/Makefile index 6732b184ffc96434795c93142adde778642c7614..5fa6d21b9afc9320f7cece9f9534ae62cc048f23 100644 --- a/test/validate/Makefile +++ b/test/validate/Makefile @@ -11,32 +11,42 @@ SNCFLAGS_DEFAULT += +m -i SNCFLAGS_vxWorks += -nil- # Sequence programs and/or object files to create -PROD += sncDelay -PROD += sncEntry -PROD += sncEntryOpte -PROD += sncEntryVar -PROD += sncExitOptx -PROD += sncOptt -PROD += sncOpttVar -PROD += assign -PROD += change -PROD += declarations -PROD += local -PROD += subscript -PROD += syncq -PROD += pvSync -PROD += pvPutAsync -PROD += array -PROD += stop -PROD += userfunc -PROD += race +TESTPROD += sncDelay +TESTPROD += sncEntry +TESTPROD += sncEntryOpte +TESTPROD += sncEntryVar +TESTPROD += sncExitOptx +TESTPROD += sncOptt +TESTPROD += sncOpttVar +TESTPROD += assign +TESTPROD += change +TESTPROD += declarations +TESTPROD += local +TESTPROD += subscript +TESTPROD += syncq +TESTPROD += pvSync +TESTPROD += pvPutAsync +TESTPROD += array +TESTPROD += stop +TESTPROD += userfunc +TESTPROD += race + +REGRESSION_TESTS_WITH_DB += eftest +REGRESSION_TESTS_WITH_DB += pvGet +REGRESSION_TESTS_WITH_DB += bittypes + +REGRESSION_TESTS_WITHOUT_DB += safeMonitor + +REGRESSION_TESTS += $(REGRESSION_TESTS_WITHOUT_DB) +REGRESSION_TESTS += $(REGRESSION_TESTS_WITH_DB) + ifeq '$(EPICS_HAS_UNIT_TEST)' '1' -PROD += eftest -PROD += pvGet -PROD += safeMonitor +TESTPROD += $(REGRESSION_TESTS) +TESTSCRIPTS_HOST += $(REGRESSION_TESTS:%=%.t) +TESTSCRIPTS_HOST += $(REGRESSION_TESTS_WITH_DB:%=%Ioc.t) endif -#PROD += ctest +#TESTPROD += ctest # Libraries PROD_LIBS += seqSoftIoc @@ -51,13 +61,14 @@ seqSoftIoc_DBD += base.dbd seqSoftIoc_SRCS += seqSoftIoc_registerRecordDeviceDriver.cpp -DB_INSTALLS += syncq.db -DB_INSTALLS += pvGet.db -DB_INSTALLS += pvPutAsync.db -DB_INSTALLS += userfunc.db -DB_INSTALLS += eftest.db -DB_INSTALLS += race.db - include $(TOP)/configure/RULES #---------------------------------------- # ADD RULES AFTER THIS LINE + +%Ioc.t: %$(EXE) + @$(RM) $@ + @$(PERL) ../makeTestfile.pl $@ $* $< + +%.t: %$(EXE) + @$(RM) $@ + @$(PERL) ../makeTestfile.pl $@ $* $< diff --git a/test/validate/makeTestfile.pl b/test/validate/makeTestfile.pl new file mode 100644 index 0000000000000000000000000000000000000000..b4893b001a4b5700ebc0298ccde789f90601455e --- /dev/null +++ b/test/validate/makeTestfile.pl @@ -0,0 +1,43 @@ +#!/usr/bin/perl +#************************************************************************* +# Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne +# National Laboratory. +# Copyright (c) 2002 The Regents of the University of California, as +# Operator of Los Alamos National Laboratory. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. +#************************************************************************* + +# The makeTestfile.pl script generates a file $target.t which is needed +# because some versions of the Perl test harness can only run test scripts +# that are actually written in Perl. The script we generate execs the +# real test program which must be in the same directory as the .t file. + +# Usage: makeTestfile.pl target.t executable +# target.t is the name of the Perl script to generate +# executable is the name of the file the script runs + +use strict; + +my ($target, $stem, $exe, $ioc) = @ARGV; + +my $db = "../$stem.db"; + +open(my $OUT, '>', $target) or die "Can't create $target: $!\n"; + +if (-r "$db" && $target =~ m/Ioc$/) { + print $OUT <<EOF; +system 'softIoc -S -d $db' or die 'system failed'; +exec './$exe -S -d $db' or die 'exec failed'; +EOF +} elsif (-r "$db") { + print $OUT <<EOF; +exec './$exe -S -d $db' or die 'exec failed'; +EOF +} else { + print $OUT <<EOF; +exec './$exe -S' or die 'exec failed'; +EOF +} + +close $OUT or die "Can't close $target: $!\n"; diff --git a/test/validate/seqMain.c b/test/validate/seqMain.c index 1e647d7eb46fd2c0c106fb715a8408cbdad85f2e..4e2165ee45eca45a6ab26d05f51dbcf66e2e93af 100644 --- a/test/validate/seqMain.c +++ b/test/validate/seqMain.c @@ -67,7 +67,7 @@ extern int seqSoftIoc_registerRecordDeviceDriver(struct dbBase *pdbbase); -#define DBD_FILE "dbd/seqSoftIoc.dbd" +#define DBD_FILE "../../../dbd/seqSoftIoc.dbd" const char *arg0; const char *base_dbd = DBD_FILE;