dejagnu
[Top][All Lists]
Advanced

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

Re: Code and comments in runtest.exp that do not match [PATCH]


From: Jacob Bachmeyer
Subject: Re: Code and comments in runtest.exp that do not match [PATCH]
Date: Wed, 21 Nov 2018 18:22:57 -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

Ben Elliston wrote:
On Tue, Nov 20, 2018 at 06:07:12PM -0600, Jacob Bachmeyer wrote:
Tue Mar 21 09:18:15 1995  Doug Evans  <address@hidden>

        * runtest.exp: Treat $DEJAGNU as a global config file (which it is).
        Don't exit if there isn't a global config file, just warn the user.
        Error if $DEJAGNU is defined but file doesn't exist.
Which behavior is correct? The behavior described in the comments?
What the current code actually does?

It's obviosuly contradictory and the documentation doesn't say,
either, so we get to pick. :-) I think we should do what the ChangeLog
says: error if $DEJAGNU is defined but the file doesn't exist.
ChangeLog entry:
----
* runtest.exp: Raise error if $DEJAGNU is defined but not found.
----

patch:
----
diff --git a/runtest.exp b/runtest.exp
index 8e6fa18..7be5a40 100644
--- a/runtest.exp
+++ b/runtest.exp
@@ -911,7 +911,8 @@ if {[info exists env(DEJAGNU)]} {
        # config file, but issue an error if $DEJAGNU is erroneously defined.
        # Since $DEJAGNU is set there is *supposed* to be a global config file,
        # so the current behaviour seems reasonable.
-       send_error "WARNING: global config file $env(DEJAGNU) not found.\n"
+       send_error "ERROR: global config file $env(DEJAGNU) not found.\n"
+       exit 1
    }
    if {![info exists boards_dir]} {
        set boards_dir "[file dirname $env(DEJAGNU)]/boards"
----


-- Jacob




reply via email to

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