summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-10 13:54:24 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-10 13:54:24 +0000
commit1b28399fef8341658aec271560a67be88fe3c073 (patch)
tree0dbe369c79ac0a9c26c7c1dccb370d4fbdaf824f /gcc
parente062b7912cd7c750517624ccf225fc97cd33da41 (diff)
downloadgcc-1b28399fef8341658aec271560a67be88fe3c073.tar.gz
* lib/g++-dg.exp: Load file-format and target-supports like gcc.
(g++-dg-prune): Call prune_gcc_output. * prune.exp: New file for prune_gcc_output. * lib/g++.exp, lib/gcc.exp: Load it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43901 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/lib/g++-dg.exp3
-rw-r--r--gcc/testsuite/lib/g++.exp9
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp1
-rw-r--r--gcc/testsuite/lib/gcc.exp32
-rw-r--r--gcc/testsuite/lib/prune.exp45
5 files changed, 52 insertions, 38 deletions
diff --git a/gcc/testsuite/lib/g++-dg.exp b/gcc/testsuite/lib/g++-dg.exp
index a47a8fa8e65..aeabf4607c2 100644
--- a/gcc/testsuite/lib/g++-dg.exp
+++ b/gcc/testsuite/lib/g++-dg.exp
@@ -17,6 +17,8 @@
# Define g++ callbacks for dg.exp.
load_lib dg.exp
+load_lib file-format.exp
+load_lib target-supports.exp
load_lib scanasm.exp
proc g++-dg-test { prog do_what extra_tool_flags } {
@@ -68,6 +70,7 @@ proc g++-dg-test { prog do_what extra_tool_flags } {
proc g++-dg-prune { system text } {
+ set text [prune_gcc_output $text]
# If we see "region xxx is full" then the testcase is too big for ram.
# This is tricky to deal with in a large testsuite like c-torture so
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index 40e8f90d41d..36024e9c280 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -21,6 +21,7 @@
#
# g++ support library routines
#
+load_lib prune.exp
#
# GXX_UNDER_TEST is the compiler under test.
@@ -290,14 +291,6 @@ if { [info procs runtest_file_p] == "" } then {
}
}
-# Provide a definition of this if missing (delete after next dejagnu release).
-
-if { [info procs prune_warnings] == "" } then {
- proc prune_warnings { text } {
- return $text
- }
-}
-
# On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
# (for the 64-bit ABI). The right way to do this would be to modify
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 80ef6554721..4faa46d8aec 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -18,6 +18,7 @@ load_lib dg.exp
load_lib file-format.exp
load_lib target-supports.exp
load_lib scanasm.exp
+load_lib prune.exp
if ![info exists TORTURE_OPTIONS] {
# It is theoretically beneficial to group all of the O2/O3 options together,
diff --git a/gcc/testsuite/lib/gcc.exp b/gcc/testsuite/lib/gcc.exp
index 5966f9c99a2..f26481e87b4 100644
--- a/gcc/testsuite/lib/gcc.exp
+++ b/gcc/testsuite/lib/gcc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1993, 1994, 1996, 1997, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
# we want to use libgloss so we can get find_gcc.
load_lib libgloss.exp
+load_lib prune.exp
#
# GCC_UNDER_TEST is the compiler under test.
@@ -275,14 +276,6 @@ if { [info procs runtest_file_p] == "" } then {
}
}
-# Provide a definition of this if missing (delete after next dejagnu release).
-
-if { [info procs prune_warnings] == "" } then {
- proc prune_warnings { text } {
- return $text
- }
-}
-
# Utility used by mike-gcc.exp and c-torture.exp.
# Check the compiler(/assembler/linker) output for text indicating that
# the testcase should be marked as "unsupported".
@@ -299,24 +292,3 @@ proc ${tool}_check_unsupported_p { output } {
}
return ""
}
-
-# Prune messages from gcc that aren't useful.
-
-proc prune_gcc_output { text } {
- #send_user "Before:$text\n"
- regsub -all "(^|\n)\[^\n\]*: In (function|method) \[^\n\]*" $text "" text
- regsub -all "(^|\n)\[^\n\]*: At top level:\[^\n\]*" $text "" text
-
- # It would be nice to avoid passing anything to gcc that would cause it to
- # issue these messages (since ignoring them seems like a hack on our part),
- # but that's too difficult in the general case. For example, sometimes
- # you need to use -B to point gcc at crt0.o, but there are some targets
- # that don't have crt0.o.
- regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text
- regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
-
- #send_user "After:$text\n"
-
- return $text
-}
-
diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
new file mode 100644
index 00000000000..6501f7b10df
--- /dev/null
+++ b/gcc/testsuite/lib/prune.exp
@@ -0,0 +1,45 @@
+# Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Prune messages from gcc that aren't useful.
+
+proc prune_gcc_output { text } {
+ #send_user "Before:$text\n"
+
+ regsub -all "(^|\n)\[^\n\]*: In (function|method) \[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*: At top level:\[^\n\]*" $text "" text
+ regsub -all "(^|\n)collect2: ld returned \[^\n\]*" $text "" text
+
+ # It would be nice to avoid passing anything to gcc that would cause it to
+ # issue these messages (since ignoring them seems like a hack on our part),
+ # but that's too difficult in the general case. For example, sometimes
+ # you need to use -B to point gcc at crt0.o, but there are some targets
+ # that don't have crt0.o.
+ regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text
+ regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
+
+ #send_user "After:$text\n"
+
+ return $text
+}
+
+# Provide a definition of this if missing (delete after next dejagnu release).
+
+if { [info procs prune_warnings] == "" } then {
+ proc prune_warnings { text } {
+ return $text
+ }
+}