dejagnu
[Top][All Lists]
Advanced

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

Re: WARNING: Couldn't find the global config file.


From: Jonathan Wakely
Subject: Re: WARNING: Couldn't find the global config file.
Date: Thu, 3 Dec 2020 13:39:19 +0000

On 03/12/20 13:33 +0000, Jonathan Wakely wrote:
The manual says "If DEJAGNU is set, but the file cannot be located, an
error will be raised and runtest will abort." That makes sense, if I
name a file that doesn't exist, I'm doing something wrong.

Despite the manual saying it's an error, and the comments in the code
saying it's an error, actually that's just a warning too.

    # If $DEJAGNU isn't set either then there isn't any global config file.
    # Warn the user as there really should be one.

Sooooo, not really optional then?

    if { ! [info exists env(DEJAGNU)] } {
        send_error "WARNING: Couldn't find the global config file.\n"
    }


    if { [load_file -- $env(DEJAGNU)] == 0 } {
        # It may seem odd to only issue a warning if there isn't a global
        # 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"
    }

That looks pretty similar to the case where $DEJAGNU isn't set at all.

What's going on here?





reply via email to

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