<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<span class="Apple-style-span" style="font-family: 'Segoe UI'; ">I am going to take an example from your a snippet test in your previous example:<div><br></div><div><span class="EC_Apple-style-span" style="font-family: Tahoma; "><pre style="white-space: normal; ">ADD_TEST(XMLExport0 ${EXECUTABLE_OUTPUT_PATH}/BasicTest +XMLEXP 0)<br>ADD_TEST(XMLExport1 ${EXECUTABLE_OUTPUT_PATH}/BasicTest +XMLEXP 1)<br>ADD_TEST(XMLExport2 ${EXECUTABLE_OUTPUT_PATH}/BasicTest +XMLEXP 2)<br>ADD_TEST(XMLExport3 ${EXECUTABLE_OUTPUT_PATH}/BasicTest +XMLEXP 3)<br>ADD_TEST(XMLExport4 ${EXECUTABLE_OUTPUT_PATH}/BasicTest +XMLEXP 4)<br>ADD_TEST(XMLExport5 ${EXECUTABLE_OUTPUT_PATH}/BasicTest +XMLEXP 5)<br>ADD_TEST(XMLExport6 ${EXECUTABLE_OUTPUT_PATH}/BasicTest +XMLEXP 6)</pre><pre style="white-space: normal; ">if this is put inside the CMakeLists.txt then if I want to run it as ctest -R testpage</pre><pre style="white-space: normal; ">then inside testing I should have an implementation of the test XMLExport0..up to XMLExport6??</pre><pre style="white-space: normal; ">What language should testpage be written in? I guess that's the question.. I am confused what to put inside testpage, an example would help.</pre></span></div></span><br><br><br><hr id="stopSpelling">Date: Fri, 28 Aug 2009 15:27:43 -0400<br>Subject: Re: [CMake] Fwd: generating CTest tests<br>From: david.cole@kitware.com<br>To: aditya15417@hotmail.com<br>CC: cmake@cmake.org<br><br><div class="EC_gmail_quote">On Fri, Aug 28, 2009 at 3:11 PM, Alex H <span dir="ltr"><<a href="mailto:aditya15417@hotmail.com">aditya15417@hotmail.com</a>></span> wrote:<br><blockquote class="EC_gmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
<div>
Hello,<div><br></div><div>So where do we specify/put in the CMakeLists.txt where test1 is expected to fail or pass? <br>How does CTest knows this...</div></div></blockquote><div><br></div><div>If your program returns a 0, it passes. If it does not, it fails.</div>
<div><br></div><div>If you want to invert this logic, set the test property "WILL_FAIL".</div><div>If you want to base the pass/fail value on test output, set the test property "PASS_REGULAR_EXPRESSION" or "FAIL_REGULAR_EXPRESSION" : if the output matches the regex, it passes or fails accordingly.</div>
<div><br></div><div>i.e.:</div><div>set_property(TEST test1 PROPERTY WILL_FAIL TRUE)</div><div>would invert the pass/fail logic</div><div><br></div><div>see also:</div><div><div>$ cmake --help-property WILL_FAIL</div><div>
$ cmake --help-property PASS_REGULAR_EXPRESSION<br></div><div>$ cmake --help-property FAIL_REGULAR_EXPRESSION<br></div><div>$ cmake --help-command set_property<br></div><div><br></div></div><div> </div><blockquote class="EC_gmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
<div><div>Just to clarify the add_test command should be put inside a CMakeLists.txt?</div></div></blockquote><div><br></div><div>Yes, that's correct.</div><div><br></div><div> </div><blockquote class="EC_gmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
<div><div>What if I want to invoke</div><div>ctest using the following command:</div><div><br></div><div>ctest -R testpage</div><div><br></div><div>What should testpage have inside of it?</div></div></blockquote><div><br>
</div><div>testpage should be the name of a test added using add_test. It can have *anything you want to test* inside of it....</div><div><br></div><div>ctest -R testpage will execute the test as specified in the add_test command.</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div></div><br /><hr />Share your memories online with anyone you want <a href='http://www.microsoft.com/indonesia/windows/windowslive/products/photos-share.aspx?tab=1' target='_new'>anyone you want.</a></body>
</html>