From 513ef514e51702bf7775f79119f8e3e39ccbb784 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 27 Dec 2016 21:15:36 +0800 Subject: 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`. --- Modules/AndroidTestUtilities/PushToAndroidDevice.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}) -- cgit v0.12