Calling stop() on B2GEmulatorRunner instance doesn't stop emulator

RESOLVED INVALID

Status

Testing
Mozbase
RESOLVED INVALID
4 years ago
4 years ago

People

(Reporter: dminor, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
When running this script:
from mozrunner import B2GEmulatorRunner

b2g_home = '/home/dminor/B2G-emulator'
runner = B2GEmulatorRunner(b2g_home=b2g_home)
runner.start()
runner.stop()
runner.wait()

The stop() and wait() calls return -2. The emulator continues to run.
I think this is by design. stop() should stop the b2g process *in* the emulator, but the emulator itself shouldn't get shutdown at this point. This way you can restart the b2g process without needing to wait for the whole device to boot back up.
Calling runner.cleanup() should shutdown the emulator though.. if you want we could also add a runner.device.stop() method to do this.
(Reporter)

Comment 3

4 years ago
(In reply to Andrew Halberstadt [:ahal] from comment #2)
> Calling runner.cleanup() should shutdown the emulator though.. if you want
> we could also add a runner.device.stop() method to do this.

Yep, runner.cleanup() does the trick. Thanks!
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.