As part of the ongoing efforts to improve Automake integration, I have split the previously-conflated uses of $srcdir in DejaGnu. Due to the current architecture of DejaGnu, the new variable created to hold the base directory of the testsuite ("@srcdir@/testsuite" using Automake's @srcdir@) is visible to test scripts.

At the moment that variable is named "testsuitedir" and may or may not have the same value as "srcdir". The core uses it, but it could also be useful as a transitional feature in test scripts, since a script using this variable will work independently of using Automake's srcdir value or a legacy srcdir=@srcdir@/testsuite value.

Is "testsuitedir" the best name for this variable or can anyone suggest a better name, or possibly an API call to wrap it? (Maybe something like "[testsuite file <name>...]" to refer to a file within the testsuite sources, equivalent to "[file join $testsuitedir <name>...]"?)

Interestingly, the DejaGnu procedure "getdirs" excludes directories named "testsuite" from recursive searches. An alternative would be for this procedure to instead enter "testsuite" as its first step, but keeping the current behavior allows nested testsuites that use runtest recursively without having the outer runtest scan inner testsuites. This will be useful for the DejaGnu testsuite itself at a minimum.


-- Jacob

_______________________________________________
DejaGnu mailing list
DejaGnu@gnu.org
https://lists.gnu.org/mailman/listinfo/dejagnu

Reply via email to