|Subject:||Re: Automake testsuite misuses DejaGnu|
|Date:||Mon, 12 Jul 2021 22:01:28 -0500|
|User-agent:||Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:126.96.36.199) Gecko/20090807 MultiZilla/188.8.131.52e SeaMonkey/1.1.17 Mnenhy/0.7.6.0|
Daniel Herring wrote:
It seems fragile for DejaGnu to probe for a testsuite directory and change its behavior as you describe. For example, I could have a project without the testsuite dir, invoke the tester, and have it find and run some unrelated files in the parent directory. Unexpected behavior (chaos) may ensue.
This already happens and this is the behavior that is deprecated and even more fragile. Without a testsuite/ directory, DejaGnu will end up searching the tree for *.exp files and running them all. Eventually, if $srcdir neither is nor contains "testsuite", DejaGnu will throw an error and abort. The testsuite/ directory is a long-documented requirement.
Is there an explicit command-line argument that could be added to the Automake invocation?
Not easily; the probing is done specifically to allow for two different ways of using DejaGnu: using recursive Makefiles that invoke DejaGnu with the testsuite/ directory current, and using non-recursive Makefiles, which with Automake will invoke DejaGnu with the top-level directory, presumably containing the "testsuite" directory. Both of these cases must be supported: the toolchain packages use the former and Automake's basic DejaGnu support will use the latter if a non-recursive layout is desired.
Both of these use the same command line argument --srcdir and site.exp variable srcdir; the difference is that srcdir has acquired two different meanings.
|[Prev in Thread]||Current Thread||[Next in Thread]|