dejagnu
[Top][All Lists]
Advanced

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

[DejaGnu] Command line variable usage enhancement


From: Paul A. Houghton
Subject: [DejaGnu] Command line variable usage enhancement
Date: Fri, 27 Jul 2001 12:13:00 -0600

 I commonly pass configuration values from Makefile into dejagnu
 regression test via command line variable assignment( i.e runtest
 VAR=vaue). The only problem is, they are not 'relized' until the
 tests start running. This means these variables can not be accessed
 from TESTTOP/lib/$TOOL.exp or config/$BOARD.exp.

 It would be helpful if this code (line ~1149):

        "[A-Z0-9_-.]*=*" { # process makefile style args like CC=gcc, etc...
            if [regexp "^(\[A-Z0-9_-\]+)=(.*)$" $option junk var val] {
                set $var $val
                verbose "$var is now $val"
                append makevars "set $var $val;" ;# FIXME: Used anywhere?
                unset junk var val
            } else {
                send_error "Illegal variable specification:\n"
                send_error "$option\n"
            }
            continue
        }

 could be moved to just after( line 519):

        "--v" -
        "--verb*" {                     # (--verbose) verbose output
            incr verbose
            continue
        }

 This way the command line variables would be set before any of my
 scripts, configs or libraries are sourced.

 Thanks for all your hard work!

 Paul Houghton
 address@hidden
 ---
    /\         __@
   /  \/\    _-\<,_    IMHO - address@hidden   
 _/   /  \__(*)/ (*)



reply via email to

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