[Reproduce tool] Add Android emulator support.#1164
[Reproduce tool] Add Android emulator support.#1164mbarbella-chromium merged 4 commits intomasterfrom
Conversation
|
/gcbrun |
| # TODO(mbarbella): This is slow and flaky, but wait-for-device isn't usable if | ||
| # another device is connected (as we don't know the serial yet). Find a better | ||
| # solution. | ||
| time.sleep(30) |
There was a problem hiding this comment.
can we start the emulator with a predictable serial?
https://developer.android.com/studio/run/emulator-commandline says there's
-prop ro.serialno=123456
There was a problem hiding this comment.
++++1, predictable serial will be nice, user will be unhappy with 30 sec wait, too long.
There was a problem hiding this comment.
Great suggestion. Thanks!
There was a problem hiding this comment.
Unfortunately this doesn't seem to change how ADB recognizes the device. After setting that it still only recognized it as "emulator-5554", and running commands with -s 123456 failed.
| # TODO(mbarbella): This is slow and flaky, but wait-for-device isn't usable if | ||
| # another device is connected (as we don't know the serial yet). Find a better | ||
| # solution. | ||
| time.sleep(30) |
There was a problem hiding this comment.
++++1, predictable serial will be nice, user will be unhappy with 30 sec wait, too long.
|
/gcbrun |
| @@ -29,8 +29,8 @@ | |||
|
|
|||
| CONFIG_DIRECTORY = os.path.join( | |||
There was a problem hiding this comment.
Shouldn't this be used from constants.py
There was a problem hiding this comment.
I removed constants.py from this change (see the resolved comment thread). I originally intended to use CONFIG_DIRECTORY and some other variables from android.py as well, but realized it was unnecessary.
reproduce.sh
Outdated
| CLUSTERFUZZ_CONFIG_DIR=~/.config/clusterfuzz | ||
| ROOT_DIRECTORY=$(dirname $(readlink -f "$0")) | ||
|
|
||
| # Process command line arguments. |
There was a problem hiding this comment.
shouldn't --emulator be used here instead of --install-android-emulator, otherwise it means we provide both arguments when running reproduce.sh. --emulator could mean that we send --install-android-emulator
There was a problem hiding this comment.
emulator-install-flag might be a confusing name. I'll change it to something like "additional_deps_args". I believe the logic here is what we want, so I'm not sure I understand the concern completely.
|
/gcbrun |
PTAL.
At this point, running the emulator works fine as does installing a test app and the rest of our workflow. For ASanified chrome in particular, I'm seeing a consistent crash in libGLESv2_enc.so that looks emulator-specific. This is good in that it shows we're able to run and detect crashes, but bad in that we won't be able to detect the right ones yet. That issue should be unrelated to this change though, so we can land this then resolve it after the fact.