dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: supply useful default for RUNTEST in DejaGnu testsuite


From: Jacob Bachmeyer
Subject: PATCH: supply useful default for RUNTEST in DejaGnu testsuite
Date: Thu, 13 Dec 2018 21:16:24 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]