Status: Assigned
Owner:
jrbarne...@chromium.org
Labels: Type-Bug Pri-1 Area-Lab iteration-56
New issue 30961 by
sco...@chromium.org: Investigate moving the invocation
of servod out of autotest code
http://code.google.com/p/chromium-os/issues/detail?id=30961
Servod is currently started within Autotest as a subprocess every time a
different test that utilizes servo is run. If the assumption that the only
time we need servod launched is when run_remote_tests is used is true, we
should investigate moving the launching of a long standing servod process
into run_remote_tests.
One unresolved issue with how we currently invoke servod is how we tell
Autotest to use servod on localhost or try and use the lab convention of
hostname-servo for the servod server.
There are a few options to solve this:
1) Pass arguments in to autoserv that the control file then uses to create
the host object pointing at the proper servod instance
2) Update the site code that invokes servod to check a particular
environment variable and use it with impunity if it is set.
Correct me if I am wrong but to implement 1 we would need to change the
control file to parse args using utils.args_to_dict and pass in the proper
option to hosts.create_host. Arg parsing at this level is less than desired
and becomes the onus of every control file author to remember what to add
for the test to function properly.
The second option is to create an environment variable that the servod site
code honors and uses if it is set. This to me seems like the cleanest
solution. It is a bit magical and that is bad but overall it isn't too far
and we can make it apparent what is happening with logging. You have
minimal code to add to run_remote_tests to set that variable and minimal
code to add to the site host implementation.
If something was missed here or does not make sense given incorrect
assumptions please add those below otherwise lets implement #2.