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

Issue 736356 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Clean up VPD & Device Data Tests

Project Member Reported by hungte@chromium.org, Jun 23 2017

Issue description

Currently there are lots of pytests doing VPD & device data and their functions are overlapped with each other.

Also, with the help of new DeviceData layout and shopfloor service, we should be able to simplify a lot.

To be more specific, currently there are:

 vpd.py # legacy one to write vpd from device data / shopfloor, plus a manual UI for selecting VPD values.
 read_device_data_from_vpd # load vpd into device data
 write_device_data_to_vpd.py # write vpd from device data
 vpd_from_http.py # special test made for A/B sub panel. We should deprecate this by others
 backlight_max_brightness_vpd # similar to vpd_from_http, should be deprecated.
 update_device_data # A generic test to modify device data by given args

With the new definition of state VPD, I think we can say "all tests must write to device data, and then let a write_device_data_to_vpd write VPD values from device data, so:

 - read_device_data_from_vpd
 - write_device_data_to_vpd
 - update_device_data

P.S: should we merge read_device_data_from_vpd and write_device_data_to_vpd as a new vpd tst?j
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/6dd8cfbe440d0bb5268e532389b24816aa1332ec

commit 6dd8cfbe440d0bb5268e532389b24816aa1332ec
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Jun 30 11:53:40 2017

pytests: Merge vpd into update_device_data test.

The 'vpd' test has few functions.

 - Reading value from shopfloor is replaced by GetDeviceInfo and
   write_device_data_to_vpd.
 - From device_data is done by write_device_data_to_vpd.

The left one, "set manually" can be extended to allow modifying any
device data so we should merge it with update_device_data.

The new update_device_data now accepts two arguments:
 - manual_input: True to allow OP entering data manually (usually for
   RMA).
 - fields: A list of fields to update, as tuple (key, value, label,
   check_value) - same format from legacy vpd test.

BUG= chromium:736356 , chromium:640162 
TEST=manually executed update_device_data.

Change-Id: I4c41323cfa6bfa3dde983a0eb316120a0d94c842
Reviewed-on: https://chromium-review.googlesource.com/547220
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/6dd8cfbe440d0bb5268e532389b24816aa1332ec/py/test/shopfloor.py
[modify] https://crrev.com/6dd8cfbe440d0bb5268e532389b24816aa1332ec/py/test/pytests/update_device_data.py
[modify] https://crrev.com/6dd8cfbe440d0bb5268e532389b24816aa1332ec/po/zh-CN.po
[delete] https://crrev.com/7e5e2b7f6d6d43c868f4f7b8d0feb853ad3712aa/py/test/pytests/vpd.py
[delete] https://crrev.com/7e5e2b7f6d6d43c868f4f7b8d0feb853ad3712aa/py/test/pytests/vpd_unittest.py
[modify] https://crrev.com/6dd8cfbe440d0bb5268e532389b24816aa1332ec/py/test/test_lists/generic_run_in.py

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

still need to merge update_device_data and select_component.

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

Owner: hungte@chromium.org
Status: Fixed (was: Untriaged)
All merged.

Comment 4 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment