aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2006-04-23 00:37:15 +0000
committerJoseph Myers <joseph@codesourcery.com>2006-04-23 00:37:15 +0000
commitd8db9951fe0a3f5032aee34c5df1e223b83624b2 (patch)
treeabe19665b4c7f8c448ef07591a361f8bfce4a96c
parent005af02d9488414dec8d353bac04554ff2bb2209 (diff)
2005-01-24 Janis Johnson <janis187@us.ibm.com> * lib/gcc-dg.exp (dg-skip-if): New. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl-3_4_3-linux-branch@113189 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog.csl6
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp43
2 files changed, 49 insertions, 0 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 069825b163a..fbb7eed0baf 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,5 +1,11 @@
2006-04-22 Joseph Myers <joseph@codesourcery.com>
+ Backport:
+ 2005-01-24 Janis Johnson <janis187@us.ibm.com>
+ * lib/gcc-dg.exp (dg-skip-if): New.
+
+2006-04-22 Joseph Myers <joseph@codesourcery.com>
+
* gcc/testsuite/gcc.dg/arm-vfp1.c: Also skip for -tiwmmxt.
2006-04-22 Paul Brook <paul@codesourcery.com>
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 780155f8fce..842496f7e29 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -361,6 +361,49 @@ proc dg-require-named-sections { args } {
}
}
+# Skip the test (report it as UNSUPPORTED) if the target list and
+# included flags are matched and the excluded flags are not matched.
+#
+# The first argument is the line number of the dg-skip-if directive
+# within the test file. Remaining arguments are as for xfail lists:
+# message { targets } { include } { exclude }
+#
+# This tests against multilib flags plus either the default flags for this
+# group of tests or flags specified with a previous dg-options command.
+
+proc dg-skip-if { args } {
+ set args [lreplace $args 0 0]
+
+ set selector "target [join [lindex $args 1]]"
+ if { [dg-process-target $selector] == "S" } {
+ # The target list matched; now check the flags. The DejaGnu proc
+ # check_conditional_xfail will look at the options in compiler_flags,
+ # so set that up for this test based on flags we know about. Start
+ # the list with a dummy tool name so the list will match "*" if
+ # there are no flags.
+
+ global compiler_flags
+ upvar dg-extra-tool-flags extra_tool_flags
+
+ set compiler_flags " toolname "
+ append compiler_flags $extra_tool_flags
+ set dest [target_info name]
+ if [board_info $dest exists multilib_flags] {
+ append compiler_flags "[board_info $dest multilib_flags] "
+ }
+
+ # The target list might be an effective-target keyword, so replace
+ # the original list with "*-*-*".
+ if [check_conditional_xfail [lreplace $args 1 1 "*-*-*"]] {
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ }
+
+ # Any value in this variable was left over from an earlier test.
+ set compiler_flags ""
+ }
+}
+
# Prune any messages matching ARGS[1] (a regexp) from test output.
proc dg-prune-output { args } {
global additional_prunes