dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: remove duplicated verbose logging


From: Ben Elliston
Subject: PATCH: remove duplicated verbose logging
Date: Mon, 15 Feb 2016 07:30:32 +1100
User-agent: Mutt/1.5.23 (2014-03-12)

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  <address@hidden>

            * 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}
 }

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]