Restarting B2G before running tests, unlock screen improvements #21295
Restarting B2G before running tests, unlock screen improvements #21295
Conversation
mozilla-b2g/marionette-device-host#1 should land and be published to npm before landing this. |
Eli Perelman (eliperelman) started tests. Results |
Eli Perelman (eliperelman) started tests. Results |
Eli Perelman (eliperelman) started tests. Results |
if [ $MARIONETTE_RUNNER_HOST = "marionette-device-host" ] ; then | ||
# If we don't put some time between the b2g process restart and the | ||
# port listeners for adb, it causes errors and premature binding | ||
adb shell stop b2g && adb shell start b2g && sleep 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the sleep 2
, this command returns immediately and marionette-device-host
will start the adb forward pretty quickly, triggering the port listener prematurely. By adding in a slight delay, we can be sure that we don't start forwarding the port right before killing the b2g process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah so I think this is why we want to move this into the host and out of the shell script. The host api is very intentionally async.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I kill B2G from marionette-device-host
, then the current layout of the shell script will cause B2G to restart between every test, since marionette-device-host
is instantiated with each test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh so the only intention here is to restart before running tests and not in between?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user story is confusing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, I agree, but I may have a solution in place in marionette-device-host
. The goal is to restart B2G in-between each set of tests per app, but not each test per app. For example, if we are running make test-perf
for Settings and Gallery, we want to restart B2G once before all the Settings tests, and once again before all the Gallery tests.
Roping in @gaye. |
|
||
client.executeScript( | ||
fs.readFileSync('./tests/atoms/gaia_lock_screen.js') | ||
+ 'GaiaLockScreen.unlock();\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: move binary operator up one line
Eli Perelman (eliperelman) started tests. Results |
Superseded by #21450 |
I have picked the relevant changes for the new PR. Thanks for the help. |
No description provided.