aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-12-14 21:40:30 +0000
committerKen Raeburn <raeburn@cygnus>1994-12-14 21:40:30 +0000
commitf8eccafb1928ef07e1502e08308104c94f253a5e (patch)
tree5c6f1bdab8a87f25acd99f1995255da6bae3b7b9 /ld
parent63ca9597f087e125966d1aa8f55a79a12d6aed16 (diff)
downloadgdb-f8eccafb1928ef07e1502e08308104c94f253a5e.zip
gdb-f8eccafb1928ef07e1502e08308104c94f253a5e.tar.gz
gdb-f8eccafb1928ef07e1502e08308104c94f253a5e.tar.bz2
* lib/ld.exp (prune_system_crud): Define if not already defined, in case the
user isn't using the newest DejaGnu version that we haven't released to the net yet.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/lib/ld.exp24
1 files changed, 24 insertions, 0 deletions
diff --git a/ld/testsuite/lib/ld.exp b/ld/testsuite/lib/ld.exp
index e205cba..ee8c047 100644
--- a/ld/testsuite/lib/ld.exp
+++ b/ld/testsuite/lib/ld.exp
@@ -287,4 +287,28 @@ proc simple_diff { file_1 file_2 } {
}
}
+# This definition is taken from an unreleased version of DejaGnu. Once
+# that version gets released, and has been out in the world for a few
+# months at least, it may be safe to delete this copy.
+if ![string length [info proc prune_system_crud]] {
+ #
+ # prune_system_crud -- delete various system verbosities from TEXT on SYSTEM
+ #
+ # An example is:
+ # ld.so: warning: /usr/lib/libc.so.1.8.1 has older revision than expected 9
+ #
+ # SYSTEM is typical $target_triplet or $host_triplet.
+ #
+ # This is useful when trying to do pattern matches on program output.
+ # Sites with particular verbose os's may wish to override this in site.exp.
+ #
+ proc prune_system_crud { system text } {
+ # This is from sun4's. Do it for all machines for now.
+ # The "\\1" is to try to preserve a "\n" but only if necessary.
+ regsub -all "(^|\n)(ld.so: warning:\[^\n\]*\n?)+" $text "\\1" text
+ # It might be tempting to get carried away and delete blank lines, etc.
+ # Just delete *exactly* what we're ask to, and that's it.
+ return $text
+ }
+}