This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Adjust dg-skip-if documentation
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org, Janis Johnson <janis187 at us dot ibm dot com>
- Date: Fri, 26 Feb 2010 15:17:07 -0500
- Subject: Adjust dg-skip-if documentation
Janis, could you double-check this for me?
I tried to write a test today that should be skipped if two options
are both present. The documentation sounds like it's this:
/* { dg-skip-if "" { *-*-* } { "-march=armv4t" "-mthumb" } { "" } } */
But in fact it has to be this:
/* { dg-skip-if "" { *-*-* } { "-march=armv4t -mthumb" } { "" } } */
Each element of include-opts is treated as a list by DejaGNU's
framework.exp:check_conditional_xfail (foreach j "$opt"). The former
example matches either -march=armv4t or -mthumb, the latter matches
both (in any order or with things between them).
Hmm, perhaps this would benefit from some examples.
--
Daniel Jacobowitz
CodeSourcery
2010-02-26 Daniel Jacobowitz <dan@codesourcery.com>
* sourcebuild.texi (Test Directives): Adjust description of
dg-skip-if.
Index: sourcebuild.texi
===================================================================
--- sourcebuild.texi (revision 156497)
+++ sourcebuild.texi (working copy)
@@ -1022,10 +1022,12 @@ the test
@item @{ dg-skip-if @var{comment} @{ @var{selector} @} @{ @var{include-opts} @} @{ @var{exclude-opts} @} @}
Skip the test if the test system is included in @var{selector} and if
-each of the options in @var{include-opts} is in the set of options with
+any of the options in @var{include-opts} are in the set of options with
which the test would be compiled and if none of the options in
@var{exclude-opts} is in the set of options with which the test would be
-compiled.
+compiled. Each element in @var{include-opts} and @var{exclude-opts}
+may be a list, and every element in the list must match to include
+or exclude the test.
Use @samp{"*"} for an empty @var{include-opts} list and @samp{""} for
an empty @var{exclude-opts} list.