From 2c53bc2a27aa2b2c73b6f12c941d2c08727581e1 Mon Sep 17 00:00:00 2001 From: janis Date: Fri, 12 Nov 2004 01:13:02 +0000 Subject: [PATCH] * lib/gcc-dg.exp (dg-target-list): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90516 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/lib/gcc-dg.exp | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 501175878c2..87421355976 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,8 @@ 2004-11-11 Janis Johnson + + * lib/gcc-dg.exp (dg-target-list): New. + +2004-11-11 Janis Johnson Richard Sandiford * 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 2c2ee009fd6..1bb5bd06b26 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 -- 2.11.0