diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-15 21:05:22 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-15 21:05:22 +0000 |
commit | e63793af4953c520db3304fd589427debdc3a161 (patch) | |
tree | fde983759cddf45bf72435acf222798059919f6a /libstdc++-v3/testsuite/lib | |
parent | 427eb1388947d71bba9b9be18f6a6c4c72fe87d8 (diff) | |
download | ppe42-gcc-e63793af4953c520db3304fd589427debdc3a161.tar.gz ppe42-gcc-e63793af4953c520db3304fd589427debdc3a161.zip |
* testsuite/lib/libstdc++.exp: Set additional_prunes.
(libstdc++-dg-test): Don't prune here.
* testsuite/lib/prune.exp (dg-prune-output): New.
(libstdc++-dg-prune): Rename from prune_g++_output.
Add a bunch of prunes from gcc's prune.exp.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160812 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/lib')
-rw-r--r-- | libstdc++-v3/testsuite/lib/libstdc++.exp | 6 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/lib/prune.exp | 31 |
2 files changed, 34 insertions, 3 deletions
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 45a43dea5fd..33dc120a0b2 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -374,7 +374,6 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } { # There is a libstdc++_compile made for us by default (via the tool- # and-target file), but the defaults are lacking in goodness. set comp_output [$select_compile "$prog" "$output_file" "$compile_type" $options]; - set comp_output [ prune_g++_output $comp_output ]; return [list $comp_output $output_file] } @@ -386,13 +385,16 @@ if { [info procs saved-dg-test] == [list] } { rename dg-test saved-dg-test proc dg-test { args } { + global additional_prunes global errorInfo if { [ catch { eval saved-dg-test $args } errmsg ] } { set saved_info $errorInfo + set additional_prunes "" unset_timeout_vars error $errmsg $saved_info } + set additional_prunes "" unset_timeout_vars } } @@ -1470,3 +1472,5 @@ proc check_v3_target_binary_io { } { verbose "check_v3_target_binary_io: $et_binary_io" 2 return $et_binary_io } + +set additional_prunes "" diff --git a/libstdc++-v3/testsuite/lib/prune.exp b/libstdc++-v3/testsuite/lib/prune.exp index 6c7368d10f9..a390878d76f 100644 --- a/libstdc++-v3/testsuite/lib/prune.exp +++ b/libstdc++-v3/testsuite/lib/prune.exp @@ -17,18 +17,45 @@ # Prune messages from g++ that aren't useful. -proc prune_g++_output { text } { +# Prune any messages matching ARGS[1] (a regexp) from test output. +proc dg-prune-output { args } { + global additional_prunes + + if { [llength $args] != 2 } { + error "[lindex $args 1]: need one argument" + return + } + + lappend additional_prunes [lindex $args 1] +} + +proc libstdc++-dg-prune { system text } { + global additional_prunes # Cygwin warns about -ffunction-sections regsub -all "(^|\n)\[^\n\]*: -ffunction-sections may affect debugging on some targets\[^\n\]*" $text "" text # Remove parts of warnings that refer to location of previous # definitions, etc as these confuse dejagnu - regsub -all "(^|\n)\[^\n\]*: In function \[^\n\]*" $text "" text + regsub -all "(^|\n)(\[^\n\]*: )?In ((static member |lambda )?function|member|method|(copy )?constructor|destructor|instantiation|program|subroutine|block-data)\[^\n\]*" $text "" text + regsub -all "(^|\n)\[^\n\]*(: )?At (top level|global scope):\[^\n\]*" $text "" text + regsub -all "(^|\n)\[^\n\]*: (recursively )?instantiated from \[^\n\]*" $text "" text + regsub -all "(^|\n)\[^\n\]*: . skipping \[0-9\]* instantiation contexts \[^\n\]*" $text "" text + regsub -all "(^|\n) inlined from \[^\n\]*" $text "" text + # Why doesn't GCC need these to strip header context? + regsub -all "(^|\n)In file included from \[^\n\]*" $text "" text + regsub -all "(^|\n)\[ \t\]*from \[^\n\]*" $text "" text # Ignore errata warning from IA64 assembler. regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text + foreach p $additional_prunes { + if { [string length $p] > 0 } { + # Following regexp matches a complete line containing $p. + regsub -all "(^|\n)\[^\n\]*$p\[^\n\]*" $text "" text + } + } + return $text } |