DejaGNU test case assistance please?
Janis Johnson
janis187@us.ibm.com
Fri Oct 7 18:06:00 GMT 2005
On Fri, Oct 07, 2005 at 01:32:29AM -0700, Kean Johnston wrote:
> Is there a way to exclude specific line tests based on
> target switches? Something like dg-skip-if? Or perhaps
> thats the right think to use (but all the examples I
> have seen seem to skip the entire test case).
You're in luck! dg-warning and similar directives can be skipped or
xfailed for particular targets, but those don't take options into
account. There is, however, an effective-target keyword for fpic.
The directives used in the GCC testsuite, along with effective-target
keywords and target/xfail selectors, are documented at
http://gcc.gnu.org/onlinedocs/gccint/Test-Directives.html.
> For example, in gcc.dg/assign-warn-3.c, how would I
> ignore the check for a warning if -fPIC is used?
>
> Any help greatly appreciated.
Something like
{ dg-warning "regexp" { "" { target { ! fpic } } } }
If it should only be ignored for fpic for particular targets you
can specify that in the target selector.
Janis
More information about the Gcc
mailing list