[CMake] How to test a local git branch

David Cole david.cole at kitware.com
Fri Jun 17 09:37:44 EDT 2011


On Fri, Jun 17, 2011 at 6:46 AM, Esztermann, Ansgar <
Ansgar.Esztermann at mpi-bpc.mpg.de> wrote:

> Hi everyone,
>
> some time ago, I've set up automated nightly builds of an open-source
> project (with CTest and CDash). CTest support isn't in upstream, so I have
> created a "ctest" branch in git, pulling every night from upstream. A while
> ago, I noticed that all my test were gone -- indeed, the whole branch and
> its history were gone.
> Some investigation revealed that CTest does this on purpose (fetch and
> reset --hard instead of pull or fetch and merge) so "that the upstream
> branch is tested as expected."
>
> Is it possible to test a local branch? How would I do that?
>
>
> Thanks a lot,
>
> A.
>
> --
> Ansgar Esztermann
> DV-Systemadministration
> Max-Planck-Institut für biophysikalische Chemie, Abteilung 105
> _______________________________________________
> 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
>


If you have local-only modifications to a CMake checkout, they will be lost
if you use ctest_update to update it from our main repo. ctest_update does
that intentionally, as you've noted.

If you want to keep your local-only modifications, simply do not use
ctest_update to get the upstream changes. Write your own script, or sequence
of execute_process git calls to retrieve them and then merge or re-base your
local mods as you wish instead.

Does that make sense?

If you have further questions, a pointer to the script you're using and a
description of your local mods might help us to answer them better.

HTH,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110617/ef16fca7/attachment.htm>


More information about the CMake mailing list