diff options
author | Schuyler Kylstra <schuyler.kylstra@kitware.com> | 2016-09-15 19:31:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-30 17:49:47 (GMT) |
commit | 130784e03938b760353b3d3e46fc1b803a5bbeb3 (patch) | |
tree | 644055fc99a3b3ec5705b5713b218da9ec1aebdf /Tests/RunCMake/AndroidTestUtilities/SetupTest2.cmake | |
parent | 8f25f37676cb860348738eff4dfb1c3b8bae0b59 (diff) | |
download | CMake-130784e03938b760353b3d3e46fc1b803a5bbeb3.zip CMake-130784e03938b760353b3d3e46fc1b803a5bbeb3.tar.gz CMake-130784e03938b760353b3d3e46fc1b803a5bbeb3.tar.bz2 |
AndroidTestUtilities: Add module to help drive Android device tests
Add a module to manage the data needed for the project tests. It will
move the test data to the build directory and transfer necessary data to
an Android device if that is enabled.
Diffstat (limited to 'Tests/RunCMake/AndroidTestUtilities/SetupTest2.cmake')
-rw-r--r-- | Tests/RunCMake/AndroidTestUtilities/SetupTest2.cmake | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Tests/RunCMake/AndroidTestUtilities/SetupTest2.cmake b/Tests/RunCMake/AndroidTestUtilities/SetupTest2.cmake new file mode 100644 index 0000000..cf4c764 --- /dev/null +++ b/Tests/RunCMake/AndroidTestUtilities/SetupTest2.cmake @@ -0,0 +1,30 @@ +enable_testing() +include(AndroidTestUtilities) + +add_custom_target(tests) +find_program(adb_executable adb) + +set(ExternalData_URL_TEMPLATES + "https://data.kitware.com/api/v1/file/hashsum/%(algo)/%(hash)/download" + ) +set(test_files + "data/a.txt" + "data/subfolder/b.txt" + "data/subfolder/protobuffer.p" + ) + +set(test_libs "data/subfolder/exampleLib.txt") + +set(ANDROID 1) + +android_add_test_data(setup_test + FILES ${test_files} + LIBS ${test_libs} + DEVICE_TEST_DIR "/data/local/tests/example2" + DEVICE_OBJECT_STORE "/sdcard/.ExternalData/SHA" + NO_LINK_REGEX "\\.p$") + +set_property( + TARGET setup_test + PROPERTY EXCLUDE_FROM_ALL 1) +add_dependencies(tests setup_test) |