This patch moves the processing for "runtest --version" to the first run
through the command line arguments. Since the presence of this option
completely alters program flow, leading to an early exit rather than
running tests, there is no reason to load the rest of the framework just
to print version numbers from runtest.exp itself, the Expect extension,
and the Tcl interpreter. The latter two preclude moving this processing
to the "runtest" shell script, since the Tcl and Expect versions are
from the Expect interpreter running the main runtest.exp module.
----
ChangeLog entry:
* runtest.exp: Move processing of -V|--version option to first
pass through command line arguments instead of delaying it.
----
patch:
----
diff --git a/runtest.exp b/runtest.exp
index 09ffcf0..bea8f29 100644
--- a/runtest.exp
+++ b/runtest.exp
@@ -450,6 +450,14 @@ for { set i 0 } { $i < $argc } { incr i } {
}
switch -glob -- $option {
+ "--V*" -
+ "--vers*" { # (--version) version numbers
+ send_user "DejaGnu version\t$frame_version\n"
+ send_user "Expect version\t[exp_version]\n"
+ send_user "Tcl version\t[ info tclversion ]\n"
+ exit 0
+ }
+
"--bu*" { # (--build) the build host configuration
set arg_build_triplet $optarg
continue
@@ -1060,14 +1068,6 @@ for { set i 0 } { $i < $argc } { incr i } {
}
switch -glob -- $option {
- "--V*" -
- "--vers*" { # (--version) version numbers
- send_user "DejaGnu version\t$frame_version\n"
- send_user "Expect version\t[exp_version]\n"
- send_user "Tcl version\t[ info tclversion ]\n"
- exit 0
- }
-
"--v*" { # (--verbose) verbose output
# Already parsed.
continue
----
-- Jacob
_______________________________________________
DejaGnu mailing list
DejaGnu@gnu.org
https://lists.gnu.org/mailman/listinfo/dejagnu