From: Marek Polacek Date: Wed, 12 Nov 2014 15:48:54 +0000 (+0000) Subject: gcc-dg.exp (${tool}_load): Call prune_file_path instead of prune_gcc_output. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4feb5dd8606bdf368c44c37d3338d61abaed3be0;p=gcc.git gcc-dg.exp (${tool}_load): Call prune_file_path instead of prune_gcc_output. * lib/gcc-dg.exp (${tool}_load): Call prune_file_path instead of prune_gcc_output. * lib/prune.exp (prune_file_path): New procedure. From-SVN: r217428 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cf1107c7d2c..1c69805aed5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-11-12 Marek Polacek + + * lib/gcc-dg.exp (${tool}_load): Call prune_file_path instead + of prune_gcc_output. + * lib/prune.exp (prune_file_path): New procedure. + 2014-11-12 Marek Polacek * c-c++-common/ubsan/overflow-sub-4.c: New test. diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 8168a77a441..6df8ae18273 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -282,7 +282,7 @@ if { [info procs ${tool}_load] != [list] \ set result [list $status [lindex $result 1]] } - set result [list [lindex $result 0] [prune_gcc_output [lindex $result 1]]] + set result [list [lindex $result 0] [prune_file_path [lindex $result 1]]] return $result } } diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp index 65028c21190..df0e0530d53 100644 --- a/gcc/testsuite/lib/prune.exp +++ b/gcc/testsuite/lib/prune.exp @@ -68,13 +68,19 @@ proc prune_gcc_output { text } { # Ignore harmless warnings from Xcode 4.0. regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text + #send_user "After:$text\n" + + return $text +} + +proc prune_file_path { text } { + global srcdir + # 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" - return $text }