vanadium-archive / madb

Multi-device Android Debug Bridge (madb): A command line tool that wraps Android Debug Bridge (adb) and provides various features for controlling multiple Android devices concurrently.
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Better integration with bendroid #14

Open yyoon opened 8 years ago

yyoon commented 8 years ago

(from discussion w/ @afandria)

bendroid internally calls adb a lot, and there might be places where madb can help running those Android tests/benchmarks on multiple devices more conveniently.

afandria commented 8 years ago

FYI, some ways of running bendroid. You can run tests or benchmarks.

jiri go -profiles=v23:go,v23:android -target arm-android test -exec bendroid -v v.io/v23/security
jiri go -profiles=v23:go,v23:android -target arm-android test -exec bendroid -bench . v.io/v23/security

You'll need to install some of the new jiri profiles for this to work. Make sure to only plug in 1 Android device or else prefix the commands with ANDROID_SERIAL=<device id>

yyoon commented 8 years ago

@afandria if you have time, could you please try the madb extern command to launch the command above and see if it works in parallel? You will need to jiri update and jiri go install madb/... to install the latest version.

The idea of madb extern is that it runs the provided external command in parallel for each device in a sub shell, with ANDROID_SERIAL variable automatically set as the corresponding device serial.

The command should look the same as above, except the madb extern added at the beginning:

madb extern jiri go -profiles=v23:go,v23:android -target arm-android test -exec bendroid -v v.io/v23/security
afandria commented 8 years ago

This works for me, thanks! It ran the test on my Nexus 5 and 5x simultaneously.

Aside: My Nexus 9 had issues (log spewed [HT4ACJT01592] /system/bin/sh: tail: not found repeatedly), but that's because it doesn't seem to have tail, which is an issue with bendroid (not madb).

yyoon commented 8 years ago

Cool! Thanks for confirming. Would it make sense to document this somewhere?

afandria commented 8 years ago

The bug? Sure. https://github.com/vanadium/issues/issues/1367

yyoon commented 8 years ago

Oh, I meant the parallel running of bendroid using madb. I can put something in the madb documentation, but maybe worth mentioning this on the bendroid side too?

afandria commented 8 years ago

Makes sense to me. CCing @mattr-google @asimshankar since they'd know where to put it.