generating files from various sources instead of calling cat ${.ALLSRC} | sed
The perl case was skipped because it's not being used in the tree at this time
With the move of atf-sh into /usr/libexec in r267181, some of the
tests in the integration_test program broke because they could not
execute atf-sh from the path any longer.
This slipped through because I do have a local atf installation in
my home directory that appears in my path, hence the tests could
still execute my own version.
Fix this by forcing /usr/libexec to appear at the beginning of the
path when attempting to execute atf-sh.
To make upgrading easy (and to avoid an unnecessary entry in UPDATING),
make integration_test depend on the Makefile so that a rebuild of the
shell script is triggered. This requires a hack in the *.test.mk files
to ensure the Makefile is not treated as a source to the generated
program. Ugly, I know, but I don't have a better way of doing this at
the moment. Will think of one once I address the TODO in the *.test.mk
files that suggests generalizing the file generation functionality.
PR: 191052
Reviewed by: Garrett Cooper
Change {atf,plain,tap}.test.mk to be internal implementation details of
bsd.test.mk. Makefiles that build tests should now only include bsd.test.mk
and declaratively specify what they want to build, without worrying about
the internal implementation of the mk files.
The reason for this change is to permit building test programs of different
interfaces from a single directory, which is something I had a need for
while porting tests over from src/tools/regression/.
Additionally, this change makes it possible to perform some other requested
changes to bsd.test.mk in an easier manner. Coming soon.
Instead of assuming that plain sh test programs exist in the source
tree in their final form and are marked as executable, generate them
from a list of sources.
By default, just assume that the source file for a program P is P.sh
but allow the caller to customize the inputs. Similarly, also allow
the caller to apply sed(1) replacements on the output. These will
both be useful in hooking existing test code from tools/regression/
into the test suite.
Approved by: rpaulo (mentor)
SRCS.<prog> must be explicitly defined when using the PROGS* functionality
for each program to be built.
As there are no plain test programs in the system yet, this was not
detected.
Approved by: rpaulo (mentor)
C++ programs need to be added to PROGS_CXX, not PROGS, and the code was
actually doing both. Just keep the registration into PROGS_CXX to
prevent possible obscure build problems.
Approved by: rpaulo (mentor)