[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: move processing of -V|--version to earlier point
From: |
Jacob Bachmeyer |
Subject: |
PATCH: move processing of -V|--version to earlier point |
Date: |
Sat, 15 Dec 2018 23:04:58 -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 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
- PATCH: move processing of -V|--version to earlier point,
Jacob Bachmeyer <=