-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[android] build and run ctest-based tests on x64 #228
Comments
Building these test for android is straightforward in case of libdispatch. Build-CMakeProject in build.ps1 has all the logic for cross-platform compilation. |
Once we have the binaries, we can upload them to an emulator:
And execute them through a remote shell:
This seems like the most pragmatic solution. We just need to replicate the features we need from the ctest driver in a shell script. A timeout seems like a reasonable feature to replicate and a way to hide the output when tests pass. |
ctest is a standalone binary and cross-compiling it from source doesn't seem too complicated: https://github.com/Kitware/CMake/blob/master/Source/ctest.cxx That would give us the same kind of aggregation we have on the host machine. CMake also has an integrated way to offload tests to Android, but it doesn't seem very popular: https://cmake.org/cmake/help/latest/module/AndroidTestUtilities.html |
The Swift SDK contains components that use CTest, e.g. swift-corelibs-libdispatch
These tests have unit-test character: Test cases are executables that are invoked and timed. Exit code determines success
The binary directory contains a file
CTestTestfile.cmake
that lists all test cases and defines properties:The
ctest
executable loads this file and drives test execution:The text was updated successfully, but these errors were encountered: