[PATCH][dejagnu] truncate absolute file path into relative for dg-output

gcc/testsuite/
    * lib/gcc-dg.exp (${tool}_load): Truncate gcc output.
    * lib/prune.exp (prune_gcc_output): New absolute path to relative path
    truncation pattern.

From-SVN: r217408
This commit is contained in:
Jiong Wang 2014-11-12 09:37:01 +00:00 committed by Jiong Wang
parent e02101ff0a
commit d30fc980ac
3 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-11-12 Jiong Wang <jiong.wang@arm.com>
* lib/gcc-dg.exp (${tool}_load): Truncate gcc output.
* lib/prune.exp (prune_gcc_output): New absolute path to relative path
truncation pattern.
2014-11-12 Andreas Tobler <andreast@gcc.gnu.org> 2014-11-12 Andreas Tobler <andreast@gcc.gnu.org>
* gcc.target/arm/eabi1.c: Replace arm*-*-*eabi* and arm*-*-symbianelf* * gcc.target/arm/eabi1.c: Replace arm*-*-*eabi* and arm*-*-symbianelf*

View File

@ -281,6 +281,8 @@ if { [info procs ${tool}_load] != [list] \
} }
set result [list $status [lindex $result 1]] set result [list $status [lindex $result 1]]
} }
set result [list [lindex $result 0] [prune_gcc_output [lindex $result 1]]]
return $result return $result
} }
} }

View File

@ -22,6 +22,8 @@ if ![info exists TEST_ALWAYS_FLAGS] {
set TEST_ALWAYS_FLAGS "-fno-diagnostics-show-caret -fdiagnostics-color=never $TEST_ALWAYS_FLAGS" set TEST_ALWAYS_FLAGS "-fno-diagnostics-show-caret -fdiagnostics-color=never $TEST_ALWAYS_FLAGS"
proc prune_gcc_output { text } { proc prune_gcc_output { text } {
global srcdir
#send_user "Before:$text\n" #send_user "Before:$text\n"
regsub -all "(^|\n)(\[^\n\]*: )?In ((static member |lambda )?function|member|method|(copy )?constructor|destructor|instantiation|substitution|program|subroutine|block-data)\[^\n\]*" $text "" text regsub -all "(^|\n)(\[^\n\]*: )?In ((static member |lambda )?function|member|method|(copy )?constructor|destructor|instantiation|substitution|program|subroutine|block-data)\[^\n\]*" $text "" text
@ -66,6 +68,11 @@ proc prune_gcc_output { text } {
# Ignore harmless warnings from Xcode 4.0. # Ignore harmless warnings from Xcode 4.0.
regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text
# Truncate absolute file path into relative path.
set topdir "[file dirname [file dirname [file dirname $srcdir]]]"
regsub -all "$srcdir\/" $text "" text
regsub -all "$topdir\/" $text "" text
#send_user "After:$text\n" #send_user "After:$text\n"
return $text return $text