[cmake-developers] Unittests with reconfiguration

David Cole DLRdave at aol.com
Mon Apr 27 07:18:17 EDT 2015


This chunk in the CMakeLists file is what sets up the arguments for
that test script:
https://github.com/Kitware/CMake/blob/master/Tests/CMakeLists.txt#L1132

D


On Mon, Apr 27, 2015 at 7:16 AM, David Cole <DLRdave at aol.com> wrote:
> This one:
> https://github.com/Kitware/CMake/blob/master/Tests/CMakeTestMultipleConfigures/RunCMake.cmake
>
> It doesn't change anything in between CMake configures, but it does 7
> altogether, with the expectation that the output will not change
> beyond the 1st / 2nd configures.
>
> Sample output here:
> https://open.cdash.org/testDetails.php?test=331119724&build=3788470
>
> The test doesn't presently fail if there are diffs between configures.
> Although one could argue, maybe it should...
>
> You could definitely do something similar for a test that changes a
> cache value in between runs.
>
>
> HTH,
> David C.
>
>
>
> On Mon, Apr 27, 2015 at 4:13 AM, Raffi Enficiaud
> <raffi.enficiaud at mines-paris.org> wrote:
>> Hi,
>>
>> I would like to know if it is possible to have a unit test with two runs of
>> cmake, simulating a user change of the cache in between.
>>
>> The workflow would be the following:
>> - run cmake with default options, cache entries automatically populated
>> - change some cache value
>> - run cmake again and check the output and cache output
>>
>> I am right now looking at RunCMake but I do not think this scheme is
>> suitable for that.
>>
>> Would anyone point me to some test already performing that?
>>
>> Many thanks,
>> Raffi
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake-developers


More information about the cmake-developers mailing list