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

Issue 718319 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Migrate the Python AST config to JSON configs.

Project Member Reported by yllin@chromium.org, May 4 2017

Issue description

https://chromium-review.googlesource.com/c/496006/1/py/test/pytests/als_fixture.py#12

> Migrate the Python AST config to JSON configs.

> Then we can have als_fixture.schema.json als_fixture.json, with a clear > definition of how to override it.



 
Project Member

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

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

commit 9bde90639b4d4ff0ba38a4d2fa46fddb64a281d4
Author: Yilun Lin <yllin@google.com>
Date: Fri Jun 23 07:51:24 2017

pytests: Add retrieve_config pytest.

The retrieve_config test can retrieved json config file from USB or
Shopfloor and place it in the config_utils.RuntimeConfigDirectory. The
following tests then can just use config_utils.LoadConfig() to load the
latest config file.

TEST=manual test ShopFloor data_method
TEST=manual test USB data_method, but not very stable
BUG= chromium:718319 

Change-Id: I7a3a9eed19678592b63d0a08be10032de8e1f238
Reviewed-on: https://chromium-review.googlesource.com/538375
Commit-Ready: Yilun Lin <yllin@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[add] https://crrev.com/9bde90639b4d4ff0ba38a4d2fa46fddb64a281d4/py/test/pytests/retrieve_config.py

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

Cc: -yllin@chromium.org -stimim@chromium.org -shunhsingou@chromium.org chromeos-factory-eng@google.com
Labels: OS-Chrome
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 31 2017

Labels: merge-merged-factory-eve-9667.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/0e02a0906e1c559d8c2c393ac536bfe2f4c53047

commit 0e02a0906e1c559d8c2c393ac536bfe2f4c53047
Author: Yilun Lin <yllin@google.com>
Date: Thu Aug 31 08:25:23 2017

als_fixture: Refactor.

This CL does many things:
  1. Refactor ambient_light_sensor and als_light_chamber
    - als_light_chamber should focus on chamber connection and
      commanding, rather than sample lux value from DUT.
    - Fix ambient_light_sensor light-init script usage.

  2. Alternate als_fixture test steps. After we deploied the
     als_calibration, we found that there are some restrictions and
     requirments change, so we slightly change the calibrating methods.
     - Remove default_sf, default_scale parameter.
     - Use simpler regression to find the linear equation.

  3. Refactor als_fixture:
    - Transform python AST parameter file to json config file, and now
      use config_utils.LoadConfig() to get the config.
    - Remove retrieving parameters from USB or ShopFloor, now a
      retrieve_config pytest does the thing.
    - Replace external UI files in als_fixture_static with ui_template
      * Remove progress bar.
      * Remove SN Inputs, now a get_module_serial_number pytest does it.
    - Remove several deprecated Arg due to refactor.
    - Replace aux_log and event_log with testlog.
    - Make the _ALSTest() more pythonic, using try-catch to locate
      failure.
    - Now als_fixtrue is an auto-start test, you need to make everythin
      ready before calling the als_fixture; you need to prepare
      for retrieving configs (if needed), and getting camera_serial_number.

TEST=setup the fixture, station and dut, and check the status is good.
BUG= chromium:718684 ,  chromium:718319 

Change-Id: Iee9aa74481f9e469035411dc15c719b990a51431
Reviewed-on: https://chromium-review.googlesource.com/607767
Commit-Queue: Yilun Lin <yllin@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[add] https://crrev.com/0e02a0906e1c559d8c2c393ac536bfe2f4c53047/py/test/pytests/als_fixture.schema.json
[modify] https://crrev.com/0e02a0906e1c559d8c2c393ac536bfe2f4c53047/po/zh-CN.po
[delete] https://crrev.com/d2daf5a4261f98de65322fb05c15a827c6435df8/py/test/pytests/als_fixture_static/als_fixture.css
[modify] https://crrev.com/0e02a0906e1c559d8c2c393ac536bfe2f4c53047/py/test/fixture/camera/als_light_chamber.py
[modify] https://crrev.com/0e02a0906e1c559d8c2c393ac536bfe2f4c53047/py/test/pytests/als_fixture.py
[delete] https://crrev.com/d2daf5a4261f98de65322fb05c15a827c6435df8/py/test/pytests/als_fixture_static/als.params.sample
[add] https://crrev.com/0e02a0906e1c559d8c2c393ac536bfe2f4c53047/py/test/pytests/als_fixture.json
[delete] https://crrev.com/d2daf5a4261f98de65322fb05c15a827c6435df8/py/test/pytests/als_fixture_static/als_fixture.js
[delete] https://crrev.com/d2daf5a4261f98de65322fb05c15a827c6435df8/py/test/pytests/als_fixture_static/als_fixture.html
[modify] https://crrev.com/0e02a0906e1c559d8c2c393ac536bfe2f4c53047/py/device/ambient_light_sensor.py

Comment 4 Deleted

Comment 5 Deleted

Comment 6 by hungte@chromium.org, Sep 26 2017

Status: Started (was: Untriaged)
all done?

Comment 7 by yllin@google.com, Sep 26 2017

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 28 2017

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

commit 9ff7eb8119c33f7548b61da3ae453709857e6970
Author: Yilun Lin <yllin@google.com>
Date: Thu Sep 28 09:04:07 2017

light_sensor_calibration: Refactor.

This CL does many things:
  1. Refactor ambient_light_sensor and light_chamber
    - light_chamber should focus on chamber connection and
      commanding, rather than sample lux value from DUT.
    - Fix ambient_light_sensor light-init script usage.

  2. Alternate light_sensor_calibration test steps. After we deployed the
     light_sensor_calibration, we found that there are some restrictions and
     requirments change, so we slightly change the calibrating methods.
     - Remove default_sf, default_scale parameter.
     - Use simpler regression to find the linear equation.

  3. Refactor light_sensor_calibration:
    - Transform python AST parameter file to json config file, and now
      use config_utils.LoadConfig() to get the config.
    - Remove retrieving parameters from USB or ShopFloor, now a
      retrieve_config pytest does the thing.
    - Replace external UI files in light_sensor_calibration_static with
      ui_template
      * Remove progress bar.
      * Remove SN Inputs.
    - Remove several deprecated Arg due to refactor.
    - Replace aux_log and event_log with testlog.
    - Make the _ALSTest() more pythonic, using try-catch to locate
      failure.
    - Now light_sensor_calibration is an auto-start test, you need to make
      everything ready before calling the light_sensor_calibration;
      you need to prepare for retrieving configs (if needed), and getting
      camera_serial_number.

TEST=setup the fixture, station and dut, and check the status is good.
BUG= chromium:718684 ,  chromium:718319 

Change-Id: Iee9aa74481f9e469035411dc15c719b990a51431
Reviewed-on: https://chromium-review.googlesource.com/547398
Commit-Ready: Yilun Lin <yllin@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[delete] https://crrev.com/6b9b2b2a762e4447e8af62eaf3cd304222a5eb13/py/test/pytests/light_sensor_calibration_static/light_sensor_calibration.html
[modify] https://crrev.com/9ff7eb8119c33f7548b61da3ae453709857e6970/py/test/pytests/light_sensor_calibration.py
[delete] https://crrev.com/6b9b2b2a762e4447e8af62eaf3cd304222a5eb13/py/test/pytests/light_sensor_calibration_static/als.params.sample
[modify] https://crrev.com/9ff7eb8119c33f7548b61da3ae453709857e6970/po/zh-CN.po
[add] https://crrev.com/9ff7eb8119c33f7548b61da3ae453709857e6970/py/test/pytests/light_sensor_calibration.json
[delete] https://crrev.com/6b9b2b2a762e4447e8af62eaf3cd304222a5eb13/py/test/pytests/light_sensor_calibration_static/light_sensor_calibration.css
[delete] https://crrev.com/6b9b2b2a762e4447e8af62eaf3cd304222a5eb13/py/test/pytests/light_sensor_calibration_static/light_sensor_calibration.js
[modify] https://crrev.com/9ff7eb8119c33f7548b61da3ae453709857e6970/py/test/fixture/light_sensor/light_chamber.py
[add] https://crrev.com/9ff7eb8119c33f7548b61da3ae453709857e6970/py/test/pytests/light_sensor_calibration.schema.json
[modify] https://crrev.com/9ff7eb8119c33f7548b61da3ae453709857e6970/py/device/ambient_light_sensor.py

Comment 9 by yllin@chromium.org, Sep 28 2017

Status: Verified (was: Started)

Sign in to add a comment