If it&#39;s supposed to be &quot;one test&quot; from ctest&#39;s point of view, you should write a script that makes 2 execute_process calls, and run the script as the add_test command.<br><br><br><div class="gmail_quote">
On Mon, May 2, 2011 at 1:25 PM, Tyler <span dir="ltr">&lt;<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I believe tests can have dependencies. Failing that, you can use the<br>
COST property to control test execution order.<br>
<br>
hth,<br>
<font color="#888888">tyler<br>
</font><div><div></div><div class="h5"><br>
On Mon, May 2, 2011 at 10:18 AM, David Doria &lt;<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>&gt; wrote:<br>
&gt; I am trying to run an executable that produces an output image, then<br>
&gt; compare this image to a baseline using a separate Compare executable.<br>
&gt;<br>
&gt; Is it possible to do this in a single add_test command? I tried<br>
&gt; separating the two executables with a semicolon, but that doesn&#39;t seem<br>
&gt; to work.<br>
&gt;<br>
&gt; add_executable(Compare Compare.cpp) #build the Compare executable<br>
&gt; add_executable(simple simple.cpp) #build the simple/test executable<br>
&gt; add_test(NAME SimpleTest COMMAND simple output.png;Compare output.png<br>
&gt; baselines/baseline.png) # run the &#39;simple&#39; executable to produce the<br>
&gt; output, then use &#39;Compare&#39; to compare it to a baseline<br>
&gt;<br>
&gt; I think doing it in two separate tests would be ok:<br>
&gt;<br>
&gt; add_test(NAME SimpleTest COMMAND simple)# run the &#39;simple&#39; executable<br>
&gt; to produce the output<br>
&gt; add_test(NAME CompareSimple COMMAND Compare output.png<br>
&gt; baselines/baseline.png) # use &#39;Compare&#39; to compare it to a baseline<br>
&gt;<br>
&gt; but I&#39;m afraid that they may run in different orders (if multiple<br>
&gt; threads are used to run the tests, etc).<br>
&gt;<br>
&gt; What would be the &quot;best practice&quot; way to do this?<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; David<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>