From 4feb5dd8606bdf368c44c37d3338d61abaed3be0 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 12 Nov 2014 15:48:54 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/lib/gcc-dg.exp | 2 +- gcc/testsuite/lib/prune.exp | 10 ++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) 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 } -- 2.30.2