Closed Bug 755473 Opened 12 years ago Closed 12 years ago

Add convenience script to launch emulator

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla15

People

(Reporter: jgriffin, Assigned: jgriffin)

Details

Attachments

(1 file)

Attached patch patch v0.1Splinter Review
James needs a convenience script to launch the emulator and optionally navigate to a specific url.

The attached does just that.  You run it from the gecko/testing/marionette/client/marionette directory, for example

./runemu.sh python --repo /path/to/B2G/repo --url about:blank --pidfile pid.txt

The first parameter is the path to python 2.7, or just 'python' if your default python is 2.7.
The second parameter is the path to the B2G repo.
The third parameter is optional; it tells the script to let B2G navigate to a specified url after the emulator is launched.
The fourth parameter is optional; it tells the script the save the emulator's pid in a file so you can kill it later.
There is also an optional fifth parameter, --arch, which defaults to x86 to cause an x86 emulator to be launched, but can be set to arm to use an arm emulator.

James, let me know if you have any problems with this.
Attachment #624163 - Flags: feedback?(jlal)
James, is this working for you?  Would you like me to land it in m-c, or are you OK just using it in-situ on the CI machine?
Comment on attachment 624163 [details] [diff] [review]
patch v0.1

Review of attachment 624163 [details] [diff] [review]:
-----------------------------------------------------------------

Working good so far. I would like it landed if that's ok by you.
I have at least one other use case for this script (blackbox test automation).

I have one small suggestion which is to change the execute_script command to the navigate/goUrl command.

Thanks for your help!

::: testing/marionette/client/marionette/runemu.py
@@ +16,5 @@
> +
> +    if url:
> +        marionette = Marionette(port=port)
> +        marionette.start_session()
> +        marionette.execute_script("window.location.href = '%s';" % url)

Malini fixed goUrl for b2g. ^
I've checked this in, switching execute_script for navigate.  I moved it to the scripts subdirectory at the same time, in order to avoid cluttering up the main dir.

http://hg.mozilla.org/mozilla-central/rev/2eee01f1c506
Assignee: nobody → jgriffin
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Attachment #624163 - Flags: feedback?(jlal)
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: