(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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159440
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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]
}
}
+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
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
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"
}
-
#
# Indicate that this test case is to be rerun several times. This
# is useful if it is nondeterministic. This applies to rerunning the
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 ""
{
return 0;
}
+
+/* Ignore a warning that is irrelevant to the purpose of this test. */
+/* { dg-prune-output ".*mudflap cannot track unknown size extern.*" } */