[CMake] ADD_TEST(...) doesn't output any tests into CTestTestfile.cmake (cmake 2.6-patch 0)

David Cole david.cole at kitware.com
Wed Mar 4 11:22:37 EST 2009


Did you call ENABLE_TESTING before any ADD_TEST calls in your
CMakeLists.txt?

On Wed, Mar 4, 2009 at 2:39 AM, Pavel Shevaev <pacha.shevaev at gmail.com>wrote:

> > So,  this should fix the problem:
> >
> > add_subdirectory(${foo_SOURCE_DIR}/../shared/lib/boost boost_lib)
>
> Thanks, it has worked indeed, however now I'm experiencing the
> following problem, running "make Experimental" yields this:
>
> ================================
> kurluka ~/foo/build$ make Experimental
>   Site: kurluka
>   Build name: Linux-c++
> Create new tag: 20090304-0728 - Experimental
> Start processing tests
> Configure project
>   Each . represents 1024 bytes of output
>    .. Size of output: 1K
> Build project
>   Each symbol represents 1024 bytes of output.
>   '!' represents an error and '*' a warning.
>    .. Size of output: 1K
>   0 Compiler errors
>   0 Compiler warnings
> Test project /home/../foo/build
> **** No tests were found!!! ****
> Performing coverage
>  Cannot find any coverage files. Ignoring Coverage request.
> Submit files (using http)
>   Using HTTP submit method
>   Drop site: http://localhost/cdash/submit.php?project=game
>   Uploaded: /home/../foo/build/Testing/20090304-0728/Build.xml
>   Uploaded: /home/../foo/build/Testing/20090304-0728/Configure.xml
>   Uploaded: /home/../foo/build/Testing/20090304-0728/Test.xml
>   Submission successful
> Built target Experimental
> ================================
>
> Basically it says, "No tests were found!!!" while CTestTestfile.cmake
> contains:
>
> =================================
> ADD_TEST(FooUnitTests "/home/.../foo/tests/unit/run")
> SUBDIRS(boost_lib)
> ...
> SUBDIRS(src)
> SUBDIRS(unittest_lib)
> ==================================
>
> What can be wrong again?
>
> I also don't quite understand how CTest works, am I right in thinking
> CTest just executes the test binary and depending on exit code decides
> whether tests passed or not?
>
> Thanks for any help in advance!
>
> --
> Best regards, Pavel
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090304/4d549844/attachment.htm>


More information about the CMake mailing list