<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2014-10-15 9:30 GMT+02:00 Domen Vrankar <span dir="ltr"><<a href="mailto:domen.vrankar@gmail.com" target="_blank">domen.vrankar@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I was looking at CMake automated tests and did not quite understand how they are intended to be written.<br><br></div>Do they only test for e.g. if CPack executes without errors or do they check generated files content (e.g. diff or call for e.g. rpm -qi some_pkg.rpm and then diff the output)? I'm not certain how in-depth the automated tests should be.<br></div></div></div></div></blockquote><div><br></div><div>The current CPack test inside the CMake source tree are very simple they only check whether if cpack runs properly in various situation<br></div><div>for various CPack generator. e.g. the "CPackComponentsForAll" test is run for the available CPack generator on the current platform<br></div><div>and "counts" if the number of generated package file is the appropriate one, see<br><CMakeRootSource>/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake<br><br></div><div>The other tests CPackComponents and CPackTestAllGenerators only verifies that cpack run and terminates OK.<br></div><div>The logic of activation of the various CPack generator is in:<br><CMakeRootSource>/Tests/CMakeLists.txt<br><br></div><div>inside this file reads e.g.: if(CTEST_RUN_CPackComponentsForAll)  and the following lines.<br><br></div><div>Doing more "semantic checks" e.g. running rpm -qi then compare to a reference file etc... would be indeed very nice.<br></div><div>The thing is the combinatorial explosion of what you can generate for each CPack generator is high but any more "semantic"<br></div><div>test for any CPack generator would be (I think) a good point.<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><br></div>Is there a cmake developers wiki page or some other reference with guidelines on how to write automated tests for CMake and CPack?<br></div></div></div></blockquote><div><br></div><div>I don't think there is anything like that, but that would be very helpful.<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div>Thanks,<br></div>Domen<br></div>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake-developers" target="_blank">http://public.kitware.com/mailman/listinfo/cmake-developers</a><br></blockquote></div><br><br clear="all"><br>-- <br>Erk<br>L'élection n'est pas la démocratie -- <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a>
</div></div>