gcc-dg.exp (${tool}_load): Call prune_file_path instead of prune_gcc_output.
authorMarek Polacek <polacek@redhat.com>
Wed, 12 Nov 2014 15:48:54 +0000 (15:48 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 12 Nov 2014 15:48:54 +0000 (15:48 +0000)
* 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
gcc/testsuite/lib/gcc-dg.exp
gcc/testsuite/lib/prune.exp

index cf1107c7d2c582616cb20d0f8ac5005356d6c362..1c69805aed5c157cdbe0dea26a06380abc424d02 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-12  Marek Polacek  <polacek@redhat.com>
+
+       * 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  <polacek@redhat.com>
 
        * c-c++-common/ubsan/overflow-sub-4.c: New test.
index 8168a77a441d31f32d702fd2a8db11d7f91cbea5..6df8ae18273beb8e1f7f026ab3e64a4efb8440cb 100644 (file)
@@ -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
     }
 }
index 65028c21190ac4b71b39aaa61cf0a7e0a284d3f5..df0e0530d5344a6971716c802527235db8cd2c01 100644 (file)
@@ -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
 }