This patch is a step towards being able to remove RUNTESTDEFAULTFLAGS entirely from Makefile.am. It provides a useful default for RUNTEST: the "runtest" program in the directory containing the testsuite's "testsuite" directory, which is the DejaGnu source directory in practice.

Some minor cleanups are also included: grepping the entire testsuite for "RUNTESTFLAGS" yields no hits except for this file, so the unused variable is removed; also, the global variables referenced but not used in runtest_start are removed.

Does runtest_start actually do anything useful, or should it be removed as well? The DejaGnu "runtest" program is batch-oriented, so the manual seems to suggest that runtest_start should be removed entirely; I think that its sanity check that $RUNTEST can be found should be promoted to top-level and failure converted to a fatal error.

----
ChangeLog entry:
        * testsuite/lib/runtest.exp: Use "testsuite file" to locate
        default runtest executable instead of implicitly searching PATH.
        Remove unused RUNTESTFLAGS Tcl variable.
        (runtest_start): Remove unused global variable links.
----
patch:
----
diff --git a/testsuite/lib/runtest.exp b/testsuite/lib/runtest.exp
index fa48175..399e174 100644
--- a/testsuite/lib/runtest.exp
+++ b/testsuite/lib/runtest.exp
@@ -20,7 +20,7 @@

global RUNTEST
if {![info exists RUNTEST]} then {
-    set RUNTEST [transform runtest]
+    set RUNTEST [file join [file dirname [testsuite file -source -top]] 
runtest]
}

if {![info exists EXPECT]} {
@@ -28,11 +28,6 @@ if {![info exists EXPECT]} {
    verbose "EXPECT defaulting to $EXPECT" 2
}

-global RUNTESTFLAGS
-if {![info exists RUNTESTFLAGS]} then {
-    set RUNTESTFLAGS "-v -v -a"
-}
-
#
# runtest_version -- extract and print the version number
#
@@ -61,13 +56,7 @@ proc runtest_exit { } {
# runtest_start -- start everything
#
proc runtest_start { } {
-    global verbose
-    global spawn_id
-    global subdir
-    global srcdir
-    global objdir
    global RUNTEST
-    global RUNTESTFLAGS

    if {[which $RUNTEST] != 0} then {
        perror "Can't find $RUNTEST"
----


-- Jacob

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

Reply via email to