aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2014-11-12 09:37:01 +0000
committerJiong Wang <jiwang@gcc.gnu.org>2014-11-12 09:37:01 +0000
commitd30fc980ac0178eb8a64277c063d518cb691f1d2 (patch)
tree419a5d263f6bcb1ea4ba8d091fb42f0c96f27946 /gcc
parente02101ff0ada598ec3777dfecc56ee3b84fdfa31 (diff)
downloadgcc-d30fc980ac0178eb8a64277c063d518cb691f1d2.zip
gcc-d30fc980ac0178eb8a64277c063d518cb691f1d2.tar.gz
gcc-d30fc980ac0178eb8a64277c063d518cb691f1d2.tar.bz2
[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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp2
-rw-r--r--gcc/testsuite/lib/prune.exp7
3 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3a0dfed..1cb9e1c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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>
* gcc.target/arm/eabi1.c: Replace arm*-*-*eabi* and arm*-*-symbianelf*
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index a0d1e7d..8168a77 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -281,6 +281,8 @@ 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]]]
return $result
}
}
diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
index 859d25e..65028c2 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -22,6 +22,8 @@ if ![info exists TEST_ALWAYS_FLAGS] {
set TEST_ALWAYS_FLAGS "-fno-diagnostics-show-caret -fdiagnostics-color=never $TEST_ALWAYS_FLAGS"
proc prune_gcc_output { text } {
+ global srcdir
+
#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
@@ -66,6 +68,11 @@ 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
+ # 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