<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-03-24 12:30 GMT+01:00 Nils Gladitz <span dir="ltr"><<a href="mailto:nilsgladitz@gmail.com" target="_blank">nilsgladitz@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 03/24/2017 11:50 AM, Eric Noulard wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi there,<br>
<br>
I'm playing with ctest LABELS and I wanted to know whether if it is possible<br>
to run the set of tests which have 2 labels ?<br>
<br>
I manage to have all tests which have **either** L1 or L2:<br>
<br>
ctest -L "L1|L2"<br>
<br>
but how can I write a proper command line for both L1 and L2 ?<br>
<br>
apparently<br>
<br>
ctest -L "L1" -L "L2"<br>
<br>
only takes into account the last -L argument.<br>
<br>
</blockquote>
<br></span>
I don't think it is possible currently.<br>
To a degree you might be able to work around it by creating additional labels that combine the existing ones e.g. "L1", "L2", "L1-L2".<br></blockquote><div><br></div><div>Yes of course.</div><div>I do test name mangling but I was hoping for more "classifying" feature with labels and was expecting a simple</div><div>OR and AND operation with labels. This is not the case.</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I was pondering trying to implement test filtering based on the condition evaluator CMake uses for if()/while() at some point (cmConditionEvaluator.cxx).<br>
e.g. --run-tests-if "L1 IN_LIST TEST_LABELS AND L2 IN_LIST TEST_LABELS"</blockquote><div><br></div><div>It could have been nice but may be overkill my needs.</div><div>A repetable ANDing -L or -LE will do the job.</div><div><br></div><div>That said since test filtering is regex-based I simply rediscovered that ANDing or negating regex is not easy.</div><div><br></div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div></div>