diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2010-05-15 21:19:48 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2010-05-15 21:19:48 +0200 |
commit | eb5b0f64d2af67ce9323c1d0b5be67cfb45b210a (patch) | |
tree | cd11a9beea0a8034da21fa40bbe0e2f7d7924456 /libmudflap | |
parent | 4bdd0a60b27aa25d23cc19e4ab23163edf1a363b (diff) | |
download | gcc-eb5b0f64d2af67ce9323c1d0b5be67cfb45b210a.zip gcc-eb5b0f64d2af67ce9323c1d0b5be67cfb45b210a.tar.gz gcc-eb5b0f64d2af67ce9323c1d0b5be67cfb45b210a.tar.bz2 |
mfdg.exp (additional_prunes): New global.
* testsuite/lib/mfdg.exp (additional_prunes): New global.
(dg-test): Clear additional_prunes before test is run.
(dg-prune-output): New procedure.
* testsuite/lib/libmudflap.exp (libmudflap-dg-test): Do not call
prune_gcc_output.
(libmudflap-dg-prune): New procedure.
* testsuite/libmudflap.c++/pass57-frag.cxx (dg-prune-output):
New dg directive.
From-SVN: r159440
Diffstat (limited to 'libmudflap')
-rw-r--r-- | libmudflap/ChangeLog | 11 | ||||
-rw-r--r-- | libmudflap/testsuite/lib/libmudflap.exp | 17 | ||||
-rw-r--r-- | libmudflap/testsuite/lib/mfdg.exp | 19 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c++/pass57-frag.cxx | 3 |
4 files changed, 48 insertions, 2 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index 99112cc..0c24a03 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,14 @@ +2010-05-15 Uros Bizjak <ubizjak@gmail.com> + + * testsuite/lib/mfdg.exp (additional_prunes): New global. + (dg-test): Clear additional_prunes before test is run. + (dg-prune-output): New procedure. + * testsuite/lib/libmudflap.exp (libmudflap-dg-test): Do not call + prune_gcc_output. + (libmudflap-dg-prune): New procedure. + * testsuite/libmudflap.c++/pass57-frag.cxx (dg-prune-output): + New dg directive. + 2010-05-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> PR other/43620 diff --git a/libmudflap/testsuite/lib/libmudflap.exp b/libmudflap/testsuite/lib/libmudflap.exp index c69e84a..588ecb5 100644 --- a/libmudflap/testsuite/lib/libmudflap.exp +++ b/libmudflap/testsuite/lib/libmudflap.exp @@ -187,7 +187,6 @@ proc libmudflap-dg-test { prog do_what extra_tool_flags } { lappend options "libs=$mfconfig_libs" set comp_output [libmudflap_target_compile "$prog" "$output_file" "$compile_type" $options]; - set comp_output [prune_gcc_output $comp_output ]; return [list $comp_output $output_file] } @@ -278,6 +277,22 @@ proc libmudflap-list-sourcefiles { } { } +proc libmudflap-dg-prune { system text } { + global additional_prunes + + set text [prune_gcc_output $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 +} + + proc prune_gcc_output { text } { regsub -all {(^|\n)[^\n]*ld: warning: libgcc_s[^\n]*not found[^\n]*try using[^\n]*} $text "" text regsub -all {(^|\n)[^\n]*In function.*pthread_create[^\n]*} $text "" text diff --git a/libmudflap/testsuite/lib/mfdg.exp b/libmudflap/testsuite/lib/mfdg.exp index 0db44d5..5f86474 100644 --- a/libmudflap/testsuite/lib/mfdg.exp +++ b/libmudflap/testsuite/lib/mfdg.exp @@ -33,6 +33,7 @@ load_lib dg.exp proc dg-test { args } { global dg-do-what-default dg-interpreter-batch-mode dg-linenum-format global errorCode errorInfo + global additional_prunes global tool global srcdir ;# eg: /calvin/dje/build/gcc/./testsuite/ global host_triplet target_triplet @@ -91,6 +92,8 @@ proc dg-test { args } { set dg-extra-tool-flags $default_extra_tool_flags set dg-final-code "" + set additional_prunes "" + # `dg-output-text' is a list of two elements: pass/fail and text. # Leave second element off for now (indicates "don't perform test") set dg-output-text "P" @@ -334,7 +337,6 @@ proc dg-test { args } { } - # # Indicate that this test case is to be rerun several times. This # is useful if it is nondeterministic. This applies to rerunning the @@ -346,3 +348,18 @@ proc dg-repetitions { line value } { upvar dg-repetitions repetitions set repetitions $value } + + +# 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] +} + +set additional_prunes "" diff --git a/libmudflap/testsuite/libmudflap.c++/pass57-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass57-frag.cxx index e4fa701..8be1a2d 100644 --- a/libmudflap/testsuite/libmudflap.c++/pass57-frag.cxx +++ b/libmudflap/testsuite/libmudflap.c++/pass57-frag.cxx @@ -23,3 +23,6 @@ int main () { return 0; } + +/* Ignore a warning that is irrelevant to the purpose of this test. */ +/* { dg-prune-output ".*mudflap cannot track unknown size extern.*" } */ |