[patch RFA] minor gas testsuite output consistency nits
cgd@broadcom.com
cgd@broadcom.com
Tue Oct 7 21:11:00 GMT 2003
I've run into a few annoyances w/ gas-defs.exp over the last year or
so, specifically:
* when running certain types of tests (most often, via run_list_test
as defined by most targets' .exp files), the actual assembler
invocation wasn't included in the log. This meant that if there
were errors, one couldn't easily cut/paste the cmd to repeat.
The command *was* included when 'verbose', though. And other
assembler invocations were listed in the log unconditionally, so, it
seemed like a good idea. That's initial pair of changes below.
(The output isn't consistent, but it never was. And there are a
bunch of other places which do similar things, also pretty much all
different... *sigh*)
* in regexp_diff, if the first file was missing you'd get an warning
message. if the second file was missing, you'd get an error message
*plus* an extra FAIL indicator.
If either file is missing, it's an error. In one case it's probably
an error in the sources (test result file missing), in the other
probably a system problem (output file went away magically), but
either way it's an error. So, it should be printed that way.
The extra FAIL indicator was confusing and unnecessary. Just to be
safe, I verified that all callers of regexp_diff properly check the
return indicator. They do. (They have to, because if it finishes
'normally' with a mismatch, there's no 'fail' call there.)
tested w/ mips-elf and h8300-elf. (The latter because mips-elf
doesn't use 'gas_start', and I needed to test it. 8-)
cgd
--
2003-10-07 Chris Demetriou <cgd@broadcom.com>
* lib/gas-defs.exp (gas_run): Always log the command being run.
(gas_start): Likewise.
(regexp_diff): Make error reporting about non-existent files
consistent.
Index: lib/gas-defs.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/lib/gas-defs.exp,v
retrieving revision 1.14
diff -u -p -r1.14 gas-defs.exp
--- lib/gas-defs.exp 30 Sep 2003 21:02:08 -0000 1.14
+++ lib/gas-defs.exp 7 Oct 2003 21:02:21 -0000
@@ -41,7 +41,7 @@ proc gas_run { prog as_opts redir } {
global subdir
global host_triplet
- verbose "Executing $srcdir/lib/run $AS $ASFLAGS $as_opts $srcdir/$subdir/$prog $redir"
+ verbose -log "Executing $srcdir/lib/run $AS $ASFLAGS $as_opts $srcdir/$subdir/$prog $redir"
catch "exec $srcdir/lib/run $AS $ASFLAGS $as_opts $srcdir/$subdir/$prog $redir" comp_output
set comp_output [prune_warnings $comp_output]
verbose "output was $comp_output"
@@ -60,7 +60,7 @@ proc gas_start { prog as_opts } {
global subdir
global spawn_id
- verbose "Starting $AS $ASFLAGS $as_opts $prog" 2
+ verbose -log "Starting $AS $ASFLAGS $as_opts $prog" 2
catch {
spawn -noecho -nottycopy $srcdir/lib/run $AS $ASFLAGS $as_opts $srcdir/$subdir/$prog
} foo
@@ -583,14 +583,14 @@ proc regexp_diff { file_1 file_2 } {
if [file exists $file_1] then {
set file_a [open $file_1 r]
} else {
- warning "$file_1 doesn't exist"
+ perror "$file_1 doesn't exist"
return 1
}
if [file exists $file_2] then {
set file_b [open $file_2 r]
} else {
- fail "$file_2 doesn't exist"
+ perror "$file_2 doesn't exist"
close $file_a
return 1
}
More information about the Binutils
mailing list