Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#2154 Android64: Fix adb argument quoting
When building for Android with -DDR_COPY_TO_DEVICE=ON we can use CTest to run the DynamoRIO tests on an attached Android device. Previously this was done by adding `adb shell` to the beginning of the test command. This works fine for many test commands but doesn't properly preserve argument quoting so test commands which have spaces inside an argument would get parsed incorrectly leading to test failures. For example if we run: adb shell "foo" "bar baz" the quotes are interpreted by the host shell so the command that the remote Android shell sees is: foo bar baz The "bar baz" argument has been effectively split into two. An easy way to solve this is to surround the test command in single quotes: adb shell '"foo" "bar baz"' so the full test command is passed to the Android shell with the argument quotes intact: "foo" "bar baz" I have changed the CMake scripts to use a wrapper script instead of invoking adb directly (run_on_android_device.sh) which just applies this extra layer of quoting and allows us to run tests on Android more reliably. Issues: #2154, #1874
- Loading branch information