On Thu, Sep 24, 2009 at 10:04:40AM -0600, Dixon, Shane wrote:
> ADD_TEST(ping_test ${CMAKE_CURRENT_BINARY_DIR}/testdir/bin/MyClient.exe
> my.server.com 4321)
>
> SET_TESTS_PROPERTIES(ping_test PROPERTIES FAIL_REGULAR_EXPRESSION "Ping
> Failed")
>
> SET_TESTS_PROPERTIES(ping_test PROPERTIES PASS_REGULAR_EXPRESSION "Ping
> Successful!")
>
> If appears that by specifying the absolute path, it runs the
> MyClient.exe and the working directory isn't set to the same directory
> that the MyClient.exe resides. My ping test fails horribly because it
> can't find the client.pem in the default working directory. Is there
> any way to specify the working directory when using add_test?
Wow, you TLS-encrypt your ping packets? That's hardcore. :)
I'm surprised to see that add_test() doesn't accept a WORKING_DIRECTORY
argument.
One workaround would be to write a wrapper script that cd's to your
desired working directory and then calls your exe. Then you would
add_test(my_wrapper_script).
tyler
_______________________________________________
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