PATCH: remove duplicated verbose logging

Ben Elliston <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
In January 2004, Michael Chastain sent a DejaGnu wishlist:

  https://lists.gnu.org/archive/html/dejagnu/2004-01/msg00072.html

I have just implemented this one in the following patch:

    "When the compiler produces error messages, default_target_compile
    calls "verbose -log ...".  There is no need for "-log", because
    runtest.exp already turned on "expect" logging with "log_file -a
    $outdir/$tool.log", so there is already a copy of the compiler
    output in the log file.  Just "verbose ..." or nothing at all."

I'd be grateful for a few people to look over it, as it will alter the
.log files making it more difficult to diff them against older .log
files produced with earlier versions of DejaGnu. Comments?

Cheers, Ben


2016-02-15  Ben Elliston  <[email protected]>

	    * lib/target.exp (default_target_compile): Do not pass -log to
	    verbose when outputting the captured compiler/assembler/linker
	    diagnostic output as it will already be in the .log file courtesy
	    of Expect.

diff --git a/lib/target.exp b/lib/target.exp
index 6749caa..e8c9047 100644
--- a/lib/target.exp
+++ b/lib/target.exp
@@ -655,7 +655,7 @@ proc default_target_compile {source destfile type options} {
        verbose -log "compiler exited with status [lindex $status 0]"
     }
     if { [lindex $status 1] != "" } {
-       verbose -log "output is:\n[lindex $status 1]" 2
+       verbose "output is:\n[lindex $status 1]" 2
     }
     if { [lindex $status 0] != 0 && "${comp_output}" == "" } {
        set comp_output "exit status is [lindex $status 0]"
@@ -711,7 +711,7 @@ proc default_target_assemble { source destfile flags } {
        verbose -log "assembler exited with status [lindex $status 0]"
     }
     if { [lindex $status 1] != "" } {
-       verbose -log "assembler output is:\n[lindex $status 1]" 2
+       verbose "assembler output is:\n[lindex $status 1]" 2
     }
     return ${comp_output}
 }
@@ -803,7 +803,7 @@ proc default_link { board objects destfile flags } {
        verbose -log "linker exited with status [lindex $status 0]"
     }
     if { [lindex $status 1] != "" } {
-       verbose -log "linker output is:\n[lindex $status 1]" 2
+       verbose "linker output is:\n[lindex $status 1]" 2
     }
     return ${comp_output}
 }

_______________________________________________
DejaGnu mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/dejagnu
signature.asc (application/pgp-signature, 811 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIVAwUBVsDj53Y2KIi1WYjUAQhnVhAAjLIfIPLJdIkA2ueyoOuMh8VqV60YxYYv
l4qHmqDEk/lyUJhh2IZkitah2QZx1dRXY53X2zLtC35E9RBWmAf0iW5e/8Rcq8UZ
D3tTwBVXn/iHOdbKJ6XJO3RnS134YMi/2XUZAFjLgIXZvAecsckpApQiUgX7AzlJ
HJGnvJiGkykhjthDb8Yq4S/7QR8e/M6O+4B5pExldZ6GWhjvRbh3HCYfcxNqGYRK
VkukWhTN50KqdZKe0b0ZhWhyUH1ZcLyONuGSV0DmvJIW2opANr1uouY7DklbBmqA
r8gspXngSSmUx1hJCydMxzgs3Ogl6k/0AiSDX+nnWsjv8wZKdkCV8NIAQ3YVGlO6
cFpVCFVluVvxfZbBDJ0AQpVAp6UiUmpzZ5YBynCp6AE9mVmTn99vkHG+yhFCIRRw
+8PXHMXWmWIiUvjfs4H4eqvQ4Gp5iFhobQDLwtkLrYfvqoc8VvQXKoVYNmiSB3R6
+4iUszz6GNdKXRSxALNJM8anI42phFFyZ+MbB/3Bqsh7j6UQ5/Kt6yBUH8WEXTNT
M0qIFsJit2SU2hJIItCFYndpivm/xL3SYxI0KEHs0mfkLpJsf2A3msXFcQks6INP
uLXfinL0LJ0WMed3RjU5fTqnI10jr4dlJzoqmYOysmRT5vejNzsY4t+7mRaQpoAL
/KpPoC9UZgc=
=/eqg
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.