aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2004-11-12 01:13:02 +0000
committerJanis Johnson <janis@gcc.gnu.org>2004-11-12 01:13:02 +0000
commitc9dd20238025d7ada07751cfd899638a93f83545 (patch)
treeea0172c6fdfa690be70e42fceba587c8861584ed /gcc
parentb6dc500c521ecf59d64f9132d71bb11367997ab2 (diff)
downloadgcc-c9dd20238025d7ada07751cfd899638a93f83545.zip
gcc-c9dd20238025d7ada07751cfd899638a93f83545.tar.gz
gcc-c9dd20238025d7ada07751cfd899638a93f83545.tar.bz2
* lib/gcc-dg.exp (dg-target-list): New.
From-SVN: r90516
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp19
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5011758..8742135 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,8 @@
2004-11-11 Janis Johnson <janis187@us.ibm.com>
+
+ * lib/gcc-dg.exp (dg-target-list): New.
+
+2004-11-11 Janis Johnson <janis187@us.ibm.com>
Richard Sandiford <rsandifo@redhat.com>
* lib/target-supports.exp (get-compiler_messages): New.
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 2c2ee00..1bb5bd0 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -471,6 +471,25 @@ proc dg-xfail-if { args } {
}
}
+# Given an optional keyword "target" or "xfail" and the result of a
+# condition which has been evaluated by the framework, return a list
+# containing the keyword and "*-*-*" if the condition is true or
+# "empty-empty-empty" if the condition is false.
+
+proc dg-target-list { what cond } {
+ switch $what {
+ "target" { set result [list $what] }
+ "xfail" { set result [list $what] }
+ "" { set result [list] }
+ default { error "`$what' not allowed here" }
+ }
+ if { $cond } {
+ lappend result "*-*-*"
+ } else {
+ lappend result "empty-empty-empty"
+ }
+ return $result
+}
# We need to make sure that additional_* are cleared out after every
# test. It is not enough to clear them out *before* the next test run