[CMake] cross-testing support in cmake

Miller Henry MillerHenry at JohnDeere.com
Wed Nov 6 07:52:54 EST 2019


Easy enough.  ADD_TEST can run whatever you want.

I created a simple cmake function
Function(RUN_REMOTE_TEST testname, other_args)
   # insert useful code here…
   add_test(${testname}
      remote_run_test ${binary_dir}/${testname} other test runner script args…
  )
End_function()

You will have to figure out how to make the above work for your needs, but the idea is simple enough.   One useful thing I do in our function is create a custom target to run the test as part of the build as well, that way the TDD cycle runs all the tests.

From: CMake <cmake-bounces at cmake.org> On Behalf Of Stefan Seefeld
Sent: Tuesday, November 5, 2019 8:06 PM
To: CMake <cmake at cmake.org>
Subject: [CMake] cross-testing support in cmake


Hello,

I'm looking for ways to enable cross-testing with cmake. I imagine some helper script that, during test execution, copies the test binary to a test platform, runs the binary there, and reports back the test result. Does cmake have support for such a scenario ?

Thanks,


[Stefan]

--



      ...ich hab' noch einen Koffer in Berlin...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191106/1618c985/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 2754 bytes
Desc: image001.png
URL: <https://cmake.org/pipermail/cmake/attachments/20191106/1618c985/attachment-0001.png>


More information about the CMake mailing list