]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc-dg.exp (dg_runtest_extra_prunes): New variable to define extra prune rules that...
authorTerry Guo <terry.guo@arm.com>
Wed, 19 Sep 2012 05:17:22 +0000 (05:17 +0000)
committerXuepeng Guo <xguo@gcc.gnu.org>
Wed, 19 Sep 2012 05:17:22 +0000 (05:17 +0000)
2012-09-19  Terry Guo  <terry.guo@arm.com>

        * lib/gcc-dg.exp (dg_runtest_extra_prunes): New variable to define
        extra prune rules that will be applied to all tests in a .exp file.
        (gcc-dg-prune): Use rules defined by the above variable.
        * gcc.target/arm/arm.exp (dg_runtest_extra_prunes): Skip all the
        harmless warnings on architecture switch conflict.

From-SVN: r191460

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/arm.exp
gcc/testsuite/lib/gcc-dg.exp

index e88191507f753d868f37468bd9b01b216e369aa6..df70396f9366c90487f5b5b973bebb9f2e18cd49 100644 (file)
@@ -1,3 +1,11 @@
+2012-09-19  Terry Guo  <terry.guo@arm.com>
+
+       * lib/gcc-dg.exp (dg_runtest_extra_prunes): New variable to define
+       extra prune rules that will be applied to all tests in a .exp file.
+       (gcc-dg-prune): Use rules defined by the above variable.
+       * gcc.target/arm/arm.exp (dg_runtest_extra_prunes): Skip all the
+       harmless warnings on architecture switch conflict.
+
 2012-09-19  Hans-Peter Nilsson  <hp@axis.com>
 
        * g++.dg/debug/dwarf2/nested-3.C: Match a sequence
index 0838d37b3f0aea1a7668d23eedd42e89c369b72e..de52892101796663cc1994c1c765e9f5659c39bf 100644 (file)
@@ -30,6 +30,11 @@ if ![info exists DEFAULT_CFLAGS] then {
     set DEFAULT_CFLAGS " -ansi -pedantic-errors"
 }
 
+# This variable should only apply to tests called in this exp file.
+global dg_runtest_extra_prunes
+set dg_runtest_extra_prunes ""
+lappend dg_runtest_extra_prunes "warning: switch -m(cpu|arch)=.* conflicts with -m(cpu|arch)=.* switch"
+
 # Initialize `dg'.
 dg-init
 
@@ -38,4 +43,5 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
        "" $DEFAULT_CFLAGS
 
 # All done.
+set dg_runtest_extra_prunes ""
 dg-finish
index 07a81a5dcfbfd9ca2c5e6b35f370de2e5d2aefd8..2cc49f7e6b7705c7460a98afd1a7f8379b8cb504 100644 (file)
@@ -212,9 +212,13 @@ proc gcc-dg-test { prog do_what extra_tool_flags } {
 proc gcc-dg-prune { system text } {
     global additional_prunes
 
+    # Extra prune rules that will apply to tests defined in a .exp file.
+    # Always remember to clear it in .exp file after executed all tests.
+    global dg_runtest_extra_prunes
+
     set text [prune_gcc_output $text]
 
-    foreach p $additional_prunes {
+    foreach p "$additional_prunes $dg_runtest_extra_prunes" {
        if { [string length $p] > 0 } {
            # Following regexp matches a complete line containing $p.
            regsub -all "(^|\n)\[^\n\]*$p\[^\n\]*" $text "" text
@@ -803,3 +807,4 @@ proc gdb-exists { args } {
 }
 
 set additional_prunes ""
+set dg_runtest_extra_prunes ""