OSDN Git Service

2012-10-08 Terry Guo <terry.guo@arm.com>
authorxguo <xguo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Oct 2012 06:59:40 +0000 (06:59 +0000)
committerxguo <xguo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Oct 2012 06:59:40 +0000 (06:59 +0000)
        Backported from mainline
        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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@192196 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 7330e09..713ae41 100644 (file)
@@ -1,3 +1,14 @@
+2012-10-08  Terry Guo  <terry.guo@arm.com>
+
+       Backported from mainline
+       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-10-05  Mark Kettenis  <kettenis@openbsd.org>
 
        * config.gcc (*-*-openbsd4.[3-9]|*-*-openbsd[5-9]*): Set
index 0838d37..dc6c16a 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
 
@@ -39,3 +44,5 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
 
 # All done.
 dg-finish
+
+set dg_runtest_extra_prunes ""
index b6a73fe..8d8c538 100644 (file)
@@ -211,9 +211,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
@@ -672,6 +676,7 @@ if { [info procs saved-dg-test] == [list] } {
            set additional_files ""
            set additional_sources ""
            set additional_prunes ""
+           set dg_runtest_extra_prunes ""
            set shouldfail 0
            if [info exists compiler_conditional_xfail_data] {
                unset compiler_conditional_xfail_data
@@ -809,3 +814,4 @@ proc gdb-exists { args } {
 }
 
 set additional_prunes ""
+set dg_runtest_extra_prunes ""