android-perf-testing icon indicating copy to clipboard operation
android-perf-testing copied to clipboard

Step 7. Can't open script run_perf_tests.py on Windows

Open ivanarellano opened this issue 9 years ago • 5 comments

Running %ANDROID_HOME%\tools\monkeyrunner run_perf_tests.py .\ <DeviceId> at the project's root does not work. Monkeyrunner expects scripts in the same folder where it's at and the tutorial does not mention moving the script or adding the full file path. This should be noted on the website in Step 7 so as to avoid confusion.

ivanarellano avatar Jan 27 '16 21:01 ivanarellano

Thanks. if you qualify run_perf_tests.py as ".\run_perf_tests.py" does it work then? I thought we tested this.

PaulRashidi avatar Jan 27 '16 22:01 PaulRashidi

Hi Paul, this is the output running cmd.exe as admin. (Not under cygwin as the path implies)

Edit: This was run after after deleting the .py script from %ANDROID_HOME%\tools . I copied the script to the folder as a workaround.

C:\Users\Ivan\.babun\cygwin\home\Ivan\dev\examples\android-perf-testing>%ANDROID_HOME%\tools\monkeyrunner .\run_perf_tests.py .\ ZH80071CYG
Can't open specified script file
Usage: monkeyrunner [options] SCRIPT_FILE

    -s      MonkeyServer IP Address.
    -p      MonkeyServer TCP Port.
    -v      MonkeyServer Logging level (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF)

ivanarellano avatar Jan 27 '16 22:01 ivanarellano

Thanks, it would seem you have to fully qualify the script's location then. That would be the preferred solution since it would keep the source in the repo instead of depending on a manual copy operation.

PaulRashidi avatar Jan 27 '16 23:01 PaulRashidi

I'll update it in the next day or two.

PaulRashidi avatar Jan 27 '16 23:01 PaulRashidi

Haha, I am writing this comment a day or two later :D the Codelab step 7 is still not updated.

PeterKazimir avatar Jan 25 '17 08:01 PeterKazimir