Hello,

Is there a built-in way to get a ctest -S script to checkout and pull from a 
git branch other than 'master'?  I can't seem to find a way to so this and 
there is no mention of branches at all in the official documentation:

    
https://cmake.org/cmake/help/v3.6/command/ctest_update.html?highlight=ctest_update

and there is no mention of "branch" at:

    https://cmake.org/Wiki/CMake/Testing_With_CTest

Currently, I see code that people have written which is explicitly checking out 
and updating the desired branch after ctest_update() is called (e.g. this what 
TribitsCTestDriverCore.cmake does).  Therefore, this CTest code is really just 
using ctest_update() to do a `git fetch` on the external repo.  In this case, 
if the local branch is changed to a tracking branch, then will ctest_update() 
leave that tracking branch as is and just pull from the tracking branch the 
next time the ctest -S script is called?  If that is the case, then I would 
expect CTest to report the correct list of "updated files".  But if 
ctest_update() instead switches back to the 'master' branch and then does the 
pull, then it will likely report the wrong list of "updated files".

I can dig into the source code for CTest to see what it actually does but it 
would be nice to have direct support for choosing the branch or at the very 
least just documenting the current behavior and describe the best way to work 
around the issue.

Thanks,

-Ross


Dr. Roscoe A. Bartlett, PhD
Sandia National Laboratories
Trilinos Software Engineering and Integration Technologies Lead
Consortium for the Advanced Simulation of Light Water Reactors (CASL) Physics 
Integration Infrastructure Lead

-- 

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

Reply via email to