If it's supposed to be "one test" from ctest'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"><<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>></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 <<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>> wrote:<br>
> I am trying to run an executable that produces an output image, then<br>
> compare this image to a baseline using a separate Compare executable.<br>
><br>
> Is it possible to do this in a single add_test command? I tried<br>
> separating the two executables with a semicolon, but that doesn't seem<br>
> to work.<br>
><br>
> add_executable(Compare Compare.cpp) #build the Compare executable<br>
> add_executable(simple simple.cpp) #build the simple/test executable<br>
> add_test(NAME SimpleTest COMMAND simple output.png;Compare output.png<br>
> baselines/baseline.png) # run the 'simple' executable to produce the<br>
> output, then use 'Compare' to compare it to a baseline<br>
><br>
> I think doing it in two separate tests would be ok:<br>
><br>
> add_test(NAME SimpleTest COMMAND simple)# run the 'simple' executable<br>
> to produce the output<br>
> add_test(NAME CompareSimple COMMAND Compare output.png<br>
> baselines/baseline.png) # use 'Compare' to compare it to a baseline<br>
><br>
> but I'm afraid that they may run in different orders (if multiple<br>
> threads are used to run the tests, etc).<br>
><br>
> What would be the "best practice" way to do this?<br>
><br>
> Thanks,<br>
><br>
> David<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>
><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>