[CMake] CTest - how to structure tests for different test jobs with a shared build-dir
Patrick Boettcher
patrick.boettcher at posteo.de
Thu Jul 7 01:47:31 EDT 2016
Hi list,
On Wed, 6 Jul 2016 10:19:05 +0200 Patrick Boettcher
<patrick.boettcher at posteo.de> wrote:
> I have several options at hand:
>
> - I could install the tests into the test-job-workspace (not sure if
> this will really work with ctest)
> - I could copy the build-dir (what about the absolute paths used)
> - I could simple rebuild my binaries for each job (very long and
> redundant)
>
> Ideally I could tell ctest: here is the cmake-binary-dir, here you can
> find the test-binaries, but please put the results into the job's
> workspace this dir.
I find a solution which satisfies my needs: I just copy all the
CTestTestFiles.cmake recursively while keeping the path-hierarchy.
Then running ctest at the top-level executes the tests from the
original build-dir (absolute paths) .
Copying is done like this
rsync -avm --include='*CTestTestfile.cmake' -f 'hide,! */'
This, for the moment works.
Would be nice if there was a way to tell cmake to generate ctest-files
into a separate dir.
regards,
--
Patrick.
More information about the CMake
mailing list