I'm new to cmake, a few weeks ago I decided to convert a complex and decrepit
old build system to cmake. It has gone very well, I'm quite impressed.
So, now I want to add testing support, but I haven't been able to figure out a
few things.
1. What to do with testing input files? I wrote a script to handle the
common details of running. So I just need to pass it paths to the executable
and input files. What's the best way to do this? Right now I just have them
point to the source directory, is that the best way to handle this?
add_test (Bungee ${PROJECT_SOURCE_DIR}/Examples/psuade_2test.sh
${PROJECT_BINARY_DIR}/psuade ${PROJECT_SOURCE_DIR}/Examples/Bungee/psuade.in
${PROJECT_SOURCE_DIR}/Examples/Bungee/psScript.in
${PROJECT_SOURCE_DIR}/Examples/Bungee/psScript.out)
Maybe it would be better to copy the input files to the build directory?
2. Also, with autoconf you can run installcheck. However, I'm sure what I
did here wouldn't work with an installcheck. However, I can't find any
evidence that cmake supports installcheck explicitly. Does it? And if so,
what's the right way to do it?
3. Finally, my testing script uses "diff" to compare the output from the
test to the canonical output. This works fine on various unix flavors, but I
will also need to build this on Windows (probably with mingw). Windows doesn't
have diff, but does have FC. I could probably write a windows script to do
testing. How are these problems usually handled? CMAKE_SYSTEM_NAME?
Thanks,
Jim
--
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