From 8d2d2ec6bdbe4c9e356a175caf906f0004d7c20e Mon Sep 17 00:00:00 2001 From: Janis Johnson Date: Tue, 1 Feb 2005 17:54:45 +0000 Subject: sourcebuild.texi (Test directives): Describe selector expressions. * doc/sourcebuild.texi (Test directives): Describe selector expressions. * lib/gcc-dg.exp (selector_opd, selector_list, selector_expression): New procs. (dg-process-target (local override)): Handle selector expressions. From-SVN: r94551 --- gcc/doc/sourcebuild.texi | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'gcc/doc/sourcebuild.texi') diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index f6da0c9..14cdee2 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -919,17 +919,26 @@ DejaGnu directives, which know nothing about the GCC directives, so the DejaGnu directives must precede GCC directives. Several test directives include selectors which are usually preceded by -the keyword @code{target} or @code{xfail}. A selector is one or -more target triplets, possibly including wildcard characters, or else a -single effective-target keyword. Depending on the context, the selector -specifies whether a test is skipped and reported as unsupported or is -expected to fail. Use @samp{*-*-*} to match any target. - +the keyword @code{target} or @code{xfail}. A selector is: one or more +target triplets, possibly including wildcard characters; a single +effective-target keyword; or a logical expression. Depending on the +context, the selector specifies whether a test is skipped and reported +as unsupported or is expected to fail. Use @samp{*-*-*} to match any +target. Effective-target keywords are defined in @file{target-supports.exp} in -the GCC testsuite or, in the case of unusual effective targets that are -used only for a limited number of tests, in @file{.exp} files in the -same directory as the tests. There is no mechanism to combine or negate -effective-target keywords. +the GCC testsuite. + +A selector expression appears within curly braces and uses a single +logical operator: one of @option{!}, @option{&&}, or @option{||}. An +operand is another selector expression, an effective-target keyword, +a single target triplet, or a list of target triplets within quotes or +curly braces. For example: + +@smallexample +@{ target @{ ! "hppa*-*-* ia64*-*-*" @} @} +@{ target @{ powerpc*-*-* && lp64 @} @} +@{ xfail @{ lp64 || vect_no_align @} @} +@end smallexample @table @code @item @{ dg-do @var{do-what-keyword} [@{ target/xfail @var{selector} @}] @} -- cgit v1.1