On Wed, 13 Apr 2016 07:23:27 -0400 Rocky Bernstein <[email protected]> wrote:
> The tests in the parent directory, are more end-to-end kinds of tests > and they may use top-level tools like cd-info. They are less fragile > because they cover larger units of code. But they are slower and when > there is a problem my not pinpoint the error as much. Thanks for the clarification. > > Now my biggest question. Why are all the test sources and scripts > generated from .in templates? Don't we have `make' for source files? > > Look for @..@ in the templates and you will see that those values are > custom for things specific to you setup. A common thing that is > customized for your setup is the full path of a data files that are > needed to run a test. Or where uninstalled C include headers are > located. That is what I thought. But really the only variables that are substituted are @abs_top_srcdir@ and @srcdir@, which could easily be passed as -D flags in the makefile (template). I also don't entirely see the necessity of this because make changes into the directory anyway. > > For the scripts its even worse because the generated files are not > necessarily executable. > > Not "worse" but "better" ;-) the script is not executable because > you are not supposed to execute it. Or modify it by hand. Instead > values get substituted in there such before it can be executed. If that is so, then I don't understand the lines 113-135 in tests/Makefile.am and lines 757-736 in configure.ac. But yes -- I agree that those do not need to be executable. Some of those actually use other @..@-ish variables than @srcdir@. Instead of generating every script from a template one could rather generate a single test_constants.sh (similar to config.h) with all the constants used and include it where necessary. By the way: $srcdir should get passed as an environment variable, so there is no need for a template when only the path is needed. And again, the scripts are being called from within the directory, so it should be safe to assume that $srcdir='.'. That said, I will try to include the new test directly without a template. We will see how that goes. Automake is already giving me a headache. Best Regards Leon
