As fallout from fixing the bug that finally pushed me to contact the
DejaGnu project, I have found that the DejaGnu testsuite itself does not
properly integrate with Automake. In particular, the tests driven by
options.exp overwrite the site.exp file that Automake provides, and
DejaGnu actually needs that file overwritten. Fixing this bug is a
straightforward but significant change that I initially proposed on
bug-dejangu in
<URL:http://lists.gnu.org/archive/html/bug-dejagnu/2018-10/msg00020.html>
and am reproposing here for discussion:
While the command line srcdir takes precedence over a value from
site.exp, there is a window between reading site.exp and reparsing the
command line, and the search for the tool init file occurs in this window.
I suggest adding a search path for the tool init file and specifically
supporting running DejaGnu at both top-level and in the testsuite
directory. (Both of those can currently work, so breaking either would
be bad.) I suggest searching for a tool init file on
${srcdir}/testsuite/lib/tool/${tool}.exp:${srcdir}/testsuite/lib/${tool}.exp:${srcdir}/lib/${tool}.exp
The last item on that path is the current behavior, on which some
testsuites may depend. The first item is an enhancement proposal to
allow tool init files to be kept separate from local testsuite library
modules. Additional processing during the search would eliminate
"testsuite/testsuite/" pairs if ${srcdir} ends with "testsuite".
Unless overridden, DejaGnu's srcdir should match Automake's srcdir.
There will need to be a different site.exp for the options tests
eventually, but that is a different problem from DejaGnu misusing the
Automake-provided site.exp. Also, where in the documentation should I
insert a section for the configuration files DejaGnu searches? A new
section in Reference?
-- Jacob
_______________________________________________
DejaGnu mailing list
DejaGnu@gnu.org
https://lists.gnu.org/mailman/listinfo/dejagnu