aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2017-08-15 06:06:16 +1000
committerBen Elliston <bje@gnu.org>2017-08-15 06:06:16 +1000
commit3073ac1d0b87b8e42f2b7eb427239d1053597f0b (patch)
tree97eb3c5aaf2b6250597afd1914fbb1af2ef1c475
parentb8108df20a24e9a0dc5306ee2deac9e6c68c966e (diff)
Fix bug reported by Andrey ``Bass'' Shcheglov.
* lib/framework.exp (open_logs): Set .xml filename correctly. * runtest.exp: Remove xml_file_name var. (usage): Update --xml option to not take an argument. (load_tool_init): Likewise. * doc/dejagnu.texi (Invoking runtest): Update documentation. * doc/runtest.1: Likewise.
-rw-r--r--ChangeLog9
-rw-r--r--doc/dejagnu.texi6
-rw-r--r--doc/runtest.16
-rw-r--r--lib/framework.exp6
-rw-r--r--runtest.exp6
5 files changed, 18 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index baa29c8..eb99fbe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-08-15 Ben Elliston <bje@gnu.org>
+
+ * lib/framework.exp (open_logs): Set .xml filename correctly.
+ * runtest.exp: Remove xml_file_name var.
+ (usage): Update --xml option to not take an argument.
+ (load_tool_init): Likewise.
+ * doc/dejagnu.texi (Invoking runtest): Update documentation.
+ * doc/runtest.1: Likewise.
+
2017-08-01 Ben Elliston <bje@gnu.org>
* runtest.exp (usage): Improve --strace message.
diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi
index 4d6892c..5231593 100644
--- a/doc/dejagnu.texi
+++ b/doc/dejagnu.texi
@@ -662,9 +662,9 @@ file, but not in the summary (@file{*.sum}) log file.
@item @code{-V}, @code{--version}
Prints out the version numbers of DejaGnu, Expect, and Tcl.
-@item @code{-x}, @code{--xml=FILE}
-Generate XML output. FILE is optional; if given it is the name of the
-output file. If not given, the output file is named after the tool.
+@item @code{-x}, @code{--xml}
+Generate XML output. The output file is named after the tool with an
+.xml extension.
@item @file{testfile}.exp[=arg(s)]
Specify the names of testsuites to run. By default, @emph{runtest} runs
diff --git a/doc/runtest.1 b/doc/runtest.1
index 95c9024..51cdccc 100644
--- a/doc/runtest.1
+++ b/doc/runtest.1
@@ -92,9 +92,9 @@ Use more than once to increase output further.
.B -V,\ --version
Prints out the versions of DejaGnu, Expect and Tcl.
.TP
-.B -x,\ --xml[=FILE]
-Generate XML output. \fBFILE\fR is optional; if given it is the name of
-the output file. If not given, the output file is named after the tool.
+.B -x,\ --xml
+Generate XML output. The output file is named after the tool with
+an .xml extension.
.TP
.B -D[number]
Activate the Tcl debugger. \fBnumber\fR can be either 1 or 0. If it
diff --git a/lib/framework.exp b/lib/framework.exp
index b19b1f1..414351b 100644
--- a/lib/framework.exp
+++ b/lib/framework.exp
@@ -55,7 +55,6 @@ proc open_logs { } {
global tool
global sum_file
global xml_file
- global xml_file_name
global xml
if { ${tool} == "" } {
@@ -65,10 +64,7 @@ proc open_logs { } {
set sum_file [open [file join $outdir $tool.sum] w]
if { $xml } {
catch "file delete -force -- $outdir/$tool.xml"
- if { ![string compare $xml_file_name ""] } {
- set xml_file_name $tool.xml
- }
- set xml_file [open [file join $outdir $xml_file_name] w]
+ set xml_file [open [file join $outdir $tool.xml] w]
xml_output "<?xml version=\"1.0\"?>"
insertdtd
xml_output "<testsuite>"
diff --git a/runtest.exp b/runtest.exp
index 23db735..173c9a4 100644
--- a/runtest.exp
+++ b/runtest.exp
@@ -53,8 +53,7 @@ set kfail_flag 0 ;# indicates that it is a known failure
set kfail_prms 0 ;# bug id for the description of the known failure
set sum_file "" ;# name of the file that contains the summary log
set base_dir "" ;# the current working directory
-set xml_file_name "" ;# name of the xml output if requested
-set xml_file "" ;# handle on the xml file if requested
+set xml_file "" ;# handle on the XML file if requested
set xml 0 ;# flag for requesting xml
set logname "" ;# the users login name
set prms_id 0 ;# GNATS prms id number
@@ -398,7 +397,7 @@ proc usage { } {
send_user "\t--tool_opts \[options\]\tA list of additional options to pass to the tool\n"
send_user "\t--verbose, -v\t\tProduce verbose output\n"
send_user "\t--version, -V\t\tPrint all relevant version numbers\n"
- send_user "\t--xml\[=name\], -x\tTurn on XML output generation\n"
+ send_user "\t--xml, -x\t\tWrite out an XML results file\n"
send_user "\t--D\[0-1\]\t\tTcl debugger\n"
send_user "\tscript.exp\[=arg(s)\]\tRun these tests only\n"
if { [info exists tool] } {
@@ -1170,7 +1169,6 @@ for { set i 0 } { $i < $argc } { incr i } {
}
"--x*" {
- set xml_file_name $optarg
set xml 1
verbose "XML logging turned on"
continue