summaryrefslogtreecommitdiffstats
path: root/Modules/AndroidTestUtilities
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2016-12-27 13:15:36 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-10 18:12:45 (GMT)
commit513ef514e51702bf7775f79119f8e3e39ccbb784 (patch)
tree733fdffb82092af0c8aa4dcaab7f8c419bd48f31 /Modules/AndroidTestUtilities
parent65fb0fa63279b96035a144fd2f6413d1b2def47f (diff)
downloadCMake-513ef514e51702bf7775f79119f8e3e39ccbb784.zip
CMake-513ef514e51702bf7775f79119f8e3e39ccbb784.tar.gz
CMake-513ef514e51702bf7775f79119f8e3e39ccbb784.tar.bz2
AndroidTestUtilities: fix cleanup operation
`su` is not available by default on all devices: ``` > adb shell "echo ls /data/local/tmp | su" /system/bin/sh: su: not found > echo $? 0 ``` Also since `execute_adb_command` use `execute_process` under the hood the pipeline (`|`) will not be treated as special symbol and will be process just like one more command line argument for the `adb`.
Diffstat (limited to 'Modules/AndroidTestUtilities')
-rw-r--r--Modules/AndroidTestUtilities/PushToAndroidDevice.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake b/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake
index f5f2564..d8ca730 100644
--- a/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake
+++ b/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake
@@ -117,7 +117,7 @@ function(android_push_test_files_to_device)
check_device_file_exists(${_ptd_DEV_TEST_DIR} test_dir_exists)
if(test_dir_exists)
# This is protected in the SetupProjectTests module.
- execute_adb_command(shell echo rm -r ${_ptd_DEV_TEST_DIR} | su)
+ execute_adb_command(shell rm -r ${_ptd_DEV_TEST_DIR})
endif()
execute_adb_command(shell mkdir -p ${_ptd_DEV_TEST_DIR})