<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">    <a href="https://cmake.org/cmake/help/v3.6/command/ctest_update.html?highlight=ctest_update">
https://cmake.org/cmake/help/v3.6/command/ctest_update.html?highlight=ctest_update</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">and there is no mention of “branch” at:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">    <a href="https://cmake.org/Wiki/CMake/Testing_With_CTest">
https://cmake.org/Wiki/CMake/Testing_With_CTest</a> <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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”. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-Ross<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0in 0in 1.0pt 0in">
<p class="MsoNormal" style="border:none;padding:0in"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Dr. Roscoe A. Bartlett, PhD<o:p></o:p></p>
<p class="MsoNormal">Sandia National Laboratories<o:p></o:p></p>
<p class="MsoNormal">Trilinos Software Engineering and Integration Technologies Lead<o:p></o:p></p>
<p class="MsoNormal">Consortium for the Advanced Simulation of Light Water Reactors (CASL) Physics Integration Infrastructure Lead<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>