summaryrefslogtreecommitdiff
path: root/testsuite/lib
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2010-11-21 10:50:56 -0500
committerAnthony Green <green@moxielogic.com>2010-11-21 10:50:56 -0500
commit2db72615b50eb5c0f29725c02c740a2f0d7fc7d9 (patch)
treef54a6a58f89314f967eae578d54de8f851e3d380 /testsuite/lib
parent84e8de6e9fc19388f6f1102c013b7d0d52940ecc (diff)
downloadlibffi-2db72615b50eb5c0f29725c02c740a2f0d7fc7d9.tar.gz
Rebase
Diffstat (limited to 'testsuite/lib')
-rw-r--r--testsuite/lib/.svn/entries62
-rw-r--r--testsuite/lib/libffi.exp (renamed from testsuite/lib/.svn/text-base/libffi-dg.exp.svn-base)50
2 files changed, 50 insertions, 62 deletions
diff --git a/testsuite/lib/.svn/entries b/testsuite/lib/.svn/entries
deleted file mode 100644
index bf4e7ad..0000000
--- a/testsuite/lib/.svn/entries
+++ /dev/null
@@ -1,62 +0,0 @@
-10
-
-dir
-161959
-svn://gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/lib
-svn://gcc.gnu.org/svn/gcc
-
-
-
-2010-01-01T12:32:24.799527Z
-155549
-green
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-138bc75d-0d04-0410-961f-82ee72b054a4
-
-libffi-dg.exp
-file
-
-
-
-
-2010-01-06T00:59:53.816646Z
-4ff7f7a31a97eec90af2e4dfb964b213
-2010-01-01T12:32:24.799527Z
-155549
-green
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-9170
-
diff --git a/testsuite/lib/.svn/text-base/libffi-dg.exp.svn-base b/testsuite/lib/libffi.exp
index bd5a7c8..82d6652 100644
--- a/testsuite/lib/.svn/text-base/libffi-dg.exp.svn-base
+++ b/testsuite/lib/libffi.exp
@@ -272,6 +272,56 @@ proc dg-xfail-if { args } {
}
}
+proc check-flags { args } {
+
+ # The args are within another list; pull them out.
+ set args [lindex $args 0]
+
+ # The next two arguments are optional. If they were not specified,
+ # use the defaults.
+ if { [llength $args] == 2 } {
+ lappend $args [list "*"]
+ }
+ if { [llength $args] == 3 } {
+ lappend $args [list ""]
+ }
+
+ # If the option strings are the defaults, or the same as the
+ # defaults, there is no need to call check_conditional_xfail to
+ # compare them to the actual options.
+ if { [string compare [lindex $args 2] "*"] == 0
+ && [string compare [lindex $args 3] "" ] == 0 } {
+ set result 1
+ } else {
+ # The target list might be an effective-target keyword, so replace
+ # the original list with "*-*-*", since we already know it matches.
+ set result [check_conditional_xfail [lreplace $args 1 1 "*-*-*"]]
+ }
+
+ return $result
+}
+
+proc dg-skip-if { args } {
+ # Verify the number of arguments. The last two are optional.
+ set args [lreplace $args 0 0]
+ if { [llength $args] < 2 || [llength $args] > 4 } {
+ error "dg-skip-if 2: need 2, 3, or 4 arguments"
+ }
+
+ # Don't bother if we're already skipping the test.
+ upvar dg-do-what dg-do-what
+ if { [lindex ${dg-do-what} 1] == "N" } {
+ return
+ }
+
+ set selector [list target [lindex $args 1]]
+ if { [dg-process-target $selector] == "S" } {
+ if [check-flags $args] {
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ }
+ }
+}
# We need to make sure that additional_files and additional_sources
# are both cleared out after every test. It is not enough to clear