"tool-and-target-specific" configuration files

Jacob Bachmeyer <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
I have run into an interesting contradiction while documenting what 
DejaGnu expects to find in testsuite/config.  The 
load_tool_target_config proc loads a "tool-and-target-specific interface 
file" that is not actually tool-specific at all.  Comments suggest that 
the "tool" variable was planned for removal at some point, but this 
obviously is not going to actually happen.

Currently, the files loaded by the default setup_target_hook are:

1. base-config.exp from testsuite/config
2. board description files from ??? (this will be another rat's nest to 
untangle and document, but related to customizing DejaGnu rather than to 
testsuites, since boards are logically part of the testing lab rather 
than the testsuite; now on my local TODO list for later)
2a. if the board descriptions cannot be loaded but the board is named 
"unix", try [load_generic_config "unix"] ignoring failures
3. a "tool-and-target-specific" configuration derived from the active 
board's generic_name, or the other names in load_tool_target_config if 
that is not found, which are: ${target_os}.exp, default.exp, unknown.exp.

I suggest adding a "3a" that loads 
testsuite/config/${target_os}-${tool}.exp if present, after loading the 
file from step "3".  This also means that the comment on 
load_tool_target_config is wrong, but I will include fixing that in the 
patch after I have a clearer picture of what this procedure is expected 
to actually do.

Am I correct that all "config" files and board descriptions are loaded 
by the default hook procedures?

At what point in the above search is testsuite/config/unix.exp found?

Or should I shelve documenting the expected structure of a testsuite and 
untangle the board/target description rat's nest first, documenting the 
description of a testing lab under "Customizing DejaGnu"?

Aside from load_lib, are any of the other load_* procedures in 
runtest.exp considered part of any API or can they be refactored at will 
to help untangle this rat's nest?


-- Jacob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.