I believe tests can have dependencies. Failing that, you can use the
COST property to control test execution order.

hth,
tyler

On Mon, May 2, 2011 at 10:18 AM, David Doria <daviddo...@gmail.com> wrote:
> I am trying to run an executable that produces an output image, then
> compare this image to a baseline using a separate Compare executable.
>
> Is it possible to do this in a single add_test command? I tried
> separating the two executables with a semicolon, but that doesn't seem
> to work.
>
> add_executable(Compare Compare.cpp) #build the Compare executable
> add_executable(simple simple.cpp) #build the simple/test executable
> add_test(NAME SimpleTest COMMAND simple output.png;Compare output.png
> baselines/baseline.png) # run the 'simple' executable to produce the
> output, then use 'Compare' to compare it to a baseline
>
> I think doing it in two separate tests would be ok:
>
> add_test(NAME SimpleTest COMMAND simple)# run the 'simple' executable
> to produce the output
> add_test(NAME CompareSimple COMMAND Compare output.png
> baselines/baseline.png) # use 'Compare' to compare it to a baseline
>
> but I'm afraid that they may run in different orders (if multiple
> threads are used to run the tests, etc).
>
> What would be the "best practice" way to do this?
>
> Thanks,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to