New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 821500 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 823947
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Create a deploy_chrome wrapper script

Project Member Reported by bpastene@chromium.org, Mar 13 2018

Issue description

When running tests on cros, we first need to deploy/push chrome to the device. This is more involved than simply scp'ing the binary over since it needs to replace the system chrome. Fortunately chromite contains a script for doing that:
https://chromium.googlesource.com/chromiumos/chromite/+/master/scripts/deploy_chrome.py

For chrome's use-case, that means we need to run deploy_chrome.py before launching any test on the device (so that we test the actual chrome we just built). To do that I'll add a wrapper script (somewhere in testing/scripts maybe) that takes as input the test command, calls deploy_chrome.py, and if it succeeds then call the test.

+ John since he has some big ideas wrt to wrapper scripts

It's worth noting that run_cros_vm_test.py already has an option for deploying chrome before running the test, so this might only be useful for device tests.
 
Cc: shenghua...@chromium.org
+shenghuazhang fyi

what's build-time constant in this case?
cros_run_vm_test (is that what you meant?) does have a facility to do this:
https://chromium.googlesource.com/chromiumos/docs/+/master/cros_vm.md#cros_run_vm_test

This was written for use with VMs but I suppose could be generalized for DUTs. What's your use case?
Yeah, essentially I'd want a script similar to cros_run_vm_test that:
- takes as args a DUT hostname and a command
- deploys chrome to the device (by calling deploy_chrome.py)
- then runs the passed in command

The script would be pretty dumb (really just two subprocess invocations), so unless you see benefit in generalizing/putting it in chromite, I'm fine with just adding it to chromium/src.
The benefit in putting it in chromite would be that any changes to deploy_chrome can also be reflected in the wrapper. And if your goal is to keep the script dumb (and not add a lot of additional bells and whistles), you could add an option like --cmd to deploy. A lot of chromite scripts (including cros_vm and cros_run_vm_test) have --cmd.
That'd the biggest thing we'd want, yeah. 

... though my thinking at the time of filing this was that we'd invoke all telemetry & hardware tests via this wrapper. But after toying with this idea for a bit (and trying to implement it), I think it's saner/easier to simply call chromite's deploy_chrome directly from telemetry's core.

So let's hold off on adding any new scripts/features. If we ever plan on running any non-telemetry based tests on cros hardware, we may want to revisit this. For now though, I'm going to dupe this into bug 823947.

Mergedinto: 823947
Status: Duplicate (was: Assigned)

Sign in to add a comment