aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTerry Guo <terry.guo@arm.com>2012-09-19 05:17:22 +0000
committerXuepeng Guo <xguo@gcc.gnu.org>2012-09-19 05:17:22 +0000
commit06e28db05e78dc0c785b9539f811f5091ee87dd2 (patch)
tree6a6a467686b962aadf309337187d6b8c35d6d770 /gcc
parent9425c00b8ed849698869d1dc4372151c2a3a7cc3 (diff)
downloadgcc-06e28db05e78dc0c785b9539f811f5091ee87dd2.zip
gcc-06e28db05e78dc0c785b9539f811f5091ee87dd2.tar.gz
gcc-06e28db05e78dc0c785b9539f811f5091ee87dd2.tar.bz2
gcc-dg.exp (dg_runtest_extra_prunes): New variable to define extra prune rules that will be applied to all tests in a...
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gcc.target/arm/arm.exp6
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp7
3 files changed, 20 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e881915..df70396 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/gcc.target/arm/arm.exp b/gcc/testsuite/gcc.target/arm/arm.exp
index 0838d37..de52892 100644
--- a/gcc/testsuite/gcc.target/arm/arm.exp
+++ b/gcc/testsuite/gcc.target/arm/arm.exp
@@ -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
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 07a81a5..2cc49f7 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -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 ""