0

How do I run ctests from within the adb shell?

rstr1112
  • 308
  • 4
  • 13
  • You have described your intentions but seems to forget to ask the **question** (state a **problem**), with which you need our help. – Tsyvarev Jun 05 '20 at 09:35
  • "Is building cmake from source for the different android flavors my best option?" - "best option" for **what**? We won't recommend you whether it is worth to use CMake/CTest: this is mostly **subjective** choice, and Stack Overflow is not suited for *subjective questions*. If you decide to use CTest on the target machines for run tests, you obviously need it to be installed; if an installation from the sources is the only way for bring CTest/CMake to your target machines, then yes, you need to build CMake from sources. – Tsyvarev Jun 05 '20 at 10:46
  • "I can write a script to parse the existing files that ctest uses to find tests." - You may also replace `add_test` functionality in your CMake project, so it would generate tests in a format you want, so you won't be enforced to parse the format of tests for CTest. "... but I lose that nice aggregation that ctest gives." - It is what you need to choose. As I said above, subjective questions are not suited for Stack Overflow. – Tsyvarev Jun 05 '20 at 10:51
  • @Tsyvarev editted it to be just a question. – rstr1112 Jun 05 '20 at 19:16

1 Answers1

0

Generated a shell script from CMAKE that kept track of relative paths of all tests. Executed these tests from their paths on adb. No ctest aggregation though

rstr1112
  • 308
  • 4
  • 13
  • Doesn't matter even if I can run ctest from within android adb. The CTestTestfile.cmake have absolute paths depending on where it was built which in this case would be the host machine. – rstr1112 Jun 06 '20 at 06:03