* lib/gcc-dg.exp (dg-target-list): New.
authorJanis Johnson <janis187@us.ibm.com>
Fri, 12 Nov 2004 01:13:02 +0000 (01:13 +0000)
committerJanis Johnson <janis@gcc.gnu.org>
Fri, 12 Nov 2004 01:13:02 +0000 (01:13 +0000)
From-SVN: r90516

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

index 501175878c217d0a429cf18322cc24af96d0ed4e..874213559769012fdd1559988b4216e83ece92c6 100644 (file)
@@ -1,3 +1,7 @@
+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>
 
index 2c2ee009fd637745f94b147b44605ba10fe5ddaf..1bb5bd06b2685bfaf2124a038d31001fb95d7fa0 100644 (file)
@@ -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