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

Issue 677904 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocking:
issue 640162



Sign in to add a comment

factory: A lambda-free call_shopfloor.

Project Member Reported by hungte@chromium.org, Jan 3 2017

Issue description

Currently most partner-specific shopfloor interaction was done by the call_shopfloor test, with args re-evaluated that accepts lambda execution.

There are pros and cons. One advantage is that this prevents writing lots of small pytests, making it easier to limit the board-specific code only living in board overlay; and the disadvantage is that these code lives in test list, hard to debug and maintain, and not friendly for our static test list in future.

I think we want to find a solution that
 - Invocation to shopfloor can still use one single, extensible pytest.
 - Parameters should be in static form, at least not lambda.
 - Find a way so we can still allow flexibility for what to be sent as parameter for shopfloor.

For example, having all logic defined in one py module file, and then:

 pytest_name='call_shopfloor',
 dargs={
  'module': 'cros.factory.board.call_shopfloor',
  'method': 'RemoteMethod',
  'args': ''LocalMethod'
 }

would be interpreted by

 from cros.factory.board import call_shopfloor
 shopfloor.RemoteMethod(call_shopfloor.LocalMethod())


Well, this is just one idea. Open for suggestion.


Usually what we'd like to send into Shopfloor are serial number, op_id, or other device-specific stuff, so another approach is to define few keywords like the verify_value does:
 - evaluate args starting with 'dut' as calls to device_utils.CreateDUTInterface()....

We can create more keywords like
 - tar/zip: Tar/zip given path and upload the blob, for example 'tar:/var/factory'
 - device_data: Evaluate the device data dict
 - station_data: For things like OP ID?
 

Comment 1 by hungte@chromium.org, Jan 25 2017

Blocking: 640162

Comment 2 by hungte@chromium.org, Jul 26 2017

Owner: hungte@chromium.org
Status: Verified (was: Untriaged)
This is implemented by new shopfloor_service.py.

Sign in to add a comment