Re: [CMake] Is it possible to run ctest outside build tree?

2017-04-04 Thread Patrick Boettcher
Hi,

Answering a little bit late: I had a similar problem I wanted to run
only parts of my tests (-R) dedicated test-reports.

As cmake is using absolute paths to the executable the only thing I
needed to copy were the CTestFiles in all sub-directories.

  # copy all ctest-files to the current dir
  rsync -avm --include='*CTestTestfile.cmake' -f 'hide,! */' \
  ${TESTING_WORKSPACE}/* .

TESTING_WORKSPACE is the build-dir. 'current dir' is a path per
test-selection.

I then can run different ctest -R  in the different paths
using on the same binaries from one build dir and having different
test-reports.

HTH,
--
Patrick.





On Fri, 24 Mar 2017 20:11:14 +0100
Eric Noulard  wrote:

> Hi David,
> Thank you for you for checking the code. Would you think adding such a
> command line option would be acceptable upstream?
> 
> Le 24 mars 2017 18:43, "David Cole"  a écrit :
> 
> This code:
> 
> https://github.com/Kitware/CMake/blob/master/Source/ctest.cxx#L139-L157
> 
> shows ctest will look for a CTestTestfile.cmake or DartTestfile.txt
> file in the current working directory as soon as it starts. Except in
> the case of processing a "--launch" directive, in which case, it
> dispatches that in the code just above there.
> 
> So. I think you have not much choice other than to propose adding a
> new command line argument for such purpose, or wrapping existing ctest
> with your own script or program of some sort.
> 
> 
> HTH,
> David C.
> 
> 
> 
> 
> On Fri, Mar 24, 2017 at 6:04 AM, Eric Noulard 
> wrote:
> > Is possible to run ctest outside the builld tree and how?
> > typical use is when I have an out of source build I may be in the
> > source tree
> > and want to run tests without manually going to build tree.
> >
> > i.e. I currently do:
> >
> > ninja -C /my/build/tree
> >
> > is there a similar way to do that with ctest (other than creating
> > my own script, shell alias etc...)?
> >
> > --
> > Eric
> >
> > --
> >
> > 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  

-- 

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

Re: [CMake] Is it possible to run ctest outside build tree?

2017-03-26 Thread Craig Scott
Not sure if this is the sort of thing you are looking for, but you can use
the cmake -E chdir command as a way to run an arbitrary command from
another directory without having to create any extra scripts, perform shell
logic, etc. For example:

cmake -E chdir /my/build/tree ctest 




On Sun, Mar 26, 2017 at 7:29 PM, Eric Noulard 
wrote:

> This works but it is not possible to pass filtering argument (-L or -R) to
> ctest this way.
>
> Le 26 mars 2017 10:13, "Dvir Yitzchaki"  a
> écrit :
>
>> How about
>>
>>
>>
>> cmake --build /my/build/tree --target test
>>
>>
>>
>> Regards,
>>
>> Dvir
>>
>>
>>
>> *From:* CMake [mailto:cmake-boun...@cmake.org] *On Behalf Of *Eric
>> Noulard
>> *Sent:* Friday, March 24, 2017 13:04
>> *To:* CMake Mailinglist 
>> *Subject:* [CMake] Is it possible to run ctest outside build tree?
>>
>>
>>
>> Is possible to run ctest outside the builld tree and how?
>>
>> typical use is when I have an out of source build I may be in the source
>> tree
>>
>> and want to run tests without manually going to build tree.
>>
>>
>>
>> i.e. I currently do:
>>
>>
>>
>> ninja -C /my/build/tree
>>
>>
>>
>> is there a similar way to do that with ctest (other than creating my own
>> script, shell alias etc...)?
>>
>>
>>
>> --
>>
>> Eric
>>
>
> --
>
> 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
>



-- 
Craig Scott
Melbourne, Australia
https://crascit.com
-- 

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

Re: [CMake] Is it possible to run ctest outside build tree?

2017-03-26 Thread Dvir Yitzchaki
How about

cmake --build /my/build/tree --target test

Regards,
Dvir

From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Eric Noulard
Sent: Friday, March 24, 2017 13:04
To: CMake Mailinglist 
Subject: [CMake] Is it possible to run ctest outside build tree?

Is possible to run ctest outside the builld tree and how?
typical use is when I have an out of source build I may be in the source tree
and want to run tests without manually going to build tree.

i.e. I currently do:

ninja -C /my/build/tree

is there a similar way to do that with ctest (other than creating my own 
script, shell alias etc...)?

--
Eric
-- 

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

Re: [CMake] Is it possible to run ctest outside build tree?

2017-03-26 Thread Eric Noulard
This works but it is not possible to pass filtering argument (-L or -R) to
ctest this way.

Le 26 mars 2017 10:13, "Dvir Yitzchaki"  a
écrit :

> How about
>
>
>
> cmake --build /my/build/tree --target test
>
>
>
> Regards,
>
> Dvir
>
>
>
> *From:* CMake [mailto:cmake-boun...@cmake.org] *On Behalf Of *Eric Noulard
> *Sent:* Friday, March 24, 2017 13:04
> *To:* CMake Mailinglist 
> *Subject:* [CMake] Is it possible to run ctest outside build tree?
>
>
>
> Is possible to run ctest outside the builld tree and how?
>
> typical use is when I have an out of source build I may be in the source
> tree
>
> and want to run tests without manually going to build tree.
>
>
>
> i.e. I currently do:
>
>
>
> ninja -C /my/build/tree
>
>
>
> is there a similar way to do that with ctest (other than creating my own
> script, shell alias etc...)?
>
>
>
> --
>
> Eric
>
-- 

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

Re: [CMake] Is it possible to run ctest outside build tree?

2017-03-24 Thread David Cole via CMake
If the implementation is "run ctest in this build tree" and it
effectively simply does a "pushd $build_tree", runs, and then "popd",
then I don't see why anybody would object to it.

Although, a script wrapper would be completely trivial, and work with
existing ctest.


D



On Fri, Mar 24, 2017 at 3:11 PM, Eric Noulard  wrote:
> Hi David,
> Thank you for you for checking the code. Would you think adding such a
> command line option would be acceptable upstream?
>
> Le 24 mars 2017 18:43, "David Cole"  a écrit :
>
> This code:
>
> https://github.com/Kitware/CMake/blob/master/Source/ctest.cxx#L139-L157
>
> shows ctest will look for a CTestTestfile.cmake or DartTestfile.txt
> file in the current working directory as soon as it starts. Except in
> the case of processing a "--launch" directive, in which case, it
> dispatches that in the code just above there.
>
> So. I think you have not much choice other than to propose adding a
> new command line argument for such purpose, or wrapping existing ctest
> with your own script or program of some sort.
>
>
> HTH,
> David C.
>
>
>
>
> On Fri, Mar 24, 2017 at 6:04 AM, Eric Noulard 
> wrote:
>> Is possible to run ctest outside the builld tree and how?
>> typical use is when I have an out of source build I may be in the source
>> tree
>> and want to run tests without manually going to build tree.
>>
>> i.e. I currently do:
>>
>> ninja -C /my/build/tree
>>
>> is there a similar way to do that with ctest (other than creating my own
>> script, shell alias etc...)?
>>
>> --
>> Eric
>>
>> --
>>
>> 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
>
>
-- 

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

Re: [CMake] Is it possible to run ctest outside build tree?

2017-03-24 Thread Eric Noulard
Hi David,
Thank you for you for checking the code. Would you think adding such a
command line option would be acceptable upstream?

Le 24 mars 2017 18:43, "David Cole"  a écrit :

This code:

https://github.com/Kitware/CMake/blob/master/Source/ctest.cxx#L139-L157

shows ctest will look for a CTestTestfile.cmake or DartTestfile.txt
file in the current working directory as soon as it starts. Except in
the case of processing a "--launch" directive, in which case, it
dispatches that in the code just above there.

So. I think you have not much choice other than to propose adding a
new command line argument for such purpose, or wrapping existing ctest
with your own script or program of some sort.


HTH,
David C.




On Fri, Mar 24, 2017 at 6:04 AM, Eric Noulard 
wrote:
> Is possible to run ctest outside the builld tree and how?
> typical use is when I have an out of source build I may be in the source
> tree
> and want to run tests without manually going to build tree.
>
> i.e. I currently do:
>
> ninja -C /my/build/tree
>
> is there a similar way to do that with ctest (other than creating my own
> script, shell alias etc...)?
>
> --
> Eric
>
> --
>
> 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
-- 

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

Re: [CMake] Is it possible to run ctest outside build tree?

2017-03-24 Thread David Cole via CMake
This code:

https://github.com/Kitware/CMake/blob/master/Source/ctest.cxx#L139-L157

shows ctest will look for a CTestTestfile.cmake or DartTestfile.txt
file in the current working directory as soon as it starts. Except in
the case of processing a "--launch" directive, in which case, it
dispatches that in the code just above there.

So. I think you have not much choice other than to propose adding a
new command line argument for such purpose, or wrapping existing ctest
with your own script or program of some sort.


HTH,
David C.




On Fri, Mar 24, 2017 at 6:04 AM, Eric Noulard  wrote:
> Is possible to run ctest outside the builld tree and how?
> typical use is when I have an out of source build I may be in the source
> tree
> and want to run tests without manually going to build tree.
>
> i.e. I currently do:
>
> ninja -C /my/build/tree
>
> is there a similar way to do that with ctest (other than creating my own
> script, shell alias etc...)?
>
> --
> Eric
>
> --
>
> 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
-- 

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