mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-02 04:02:23 +03:00
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`.
This commit is contained in:
1 parent
65fb0fa632
commit
513ef514e5
1 file changed
+1
-1
@@ -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})
|
||||
|
||||
|
||||
Reference in new issue
Block a user