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

Issue 713589 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Graphyte: Consolidate the framework

Project Member Reported by akahuang@chromium.org, Apr 20 2017

Issue description

After deploying Graphyte to several projects, we found that there are something need to improve.

* Consider a standard procedure to verify a new-development DUT plugin.
Currently, when we verify the new DUT plugin by integrating with a well-development instrument plugin directly. It makes the integration painful because the plugin itself might have many explicit bugs. We should propose a procedure to do the sanity check first. For example, run with a dummy instrument plugin with a sample test plan.

* Implement plugin runner to execute one-step for debugging.
The plugin can be considered a wrapper of the vendor tool. When debugging, we need to know the issue occurs at the vendor tool or the plugin itself. It might be help to write a plugin runner to execute the Graphyte API step by step.

* Remove the unused API (TxConfig, RxConfig, SelfCalibrate, ...)
There are some APIs that is unused. We should remove them to simplify the whole framework.

* Define the capability of the plugin.
We need to define the port naming, supported RF types, even supported test cases to check the config file before we run it. 

* Write the unittest for framework side.
Currently we only have few unittests for some parts of the framework. Should fill the remaining part.
 
Cc: hungte@chromium.org kitching@chromium.org stimim@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/graphyte/+/a74b27b2fd674dc006d7cadff285defdcbeed425

commit a74b27b2fd674dc006d7cadff285defdcbeed425
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 14:17:33 2017

Remove inst.SelfCalibrate.

We plan to calibrate the instrument by this API, but we find out in
the real case we should calibrate the instrument before running the
Graphyte. Therefore we deprecate this function.

BUG= chromium:713589 
TEST=none

Change-Id: If2520054de2e263435736c4d81dda0f0245289d9
Reviewed-on: https://chromium-review.googlesource.com/483179
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>

[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/graphyte.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/sample/wait_inst.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/keysight/n1914a.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/__init__.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/anritsu/ml2437a.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/sample/dummy_inst.py

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/graphyte/+/a74b27b2fd674dc006d7cadff285defdcbeed425

commit a74b27b2fd674dc006d7cadff285defdcbeed425
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 14:17:33 2017

Remove inst.SelfCalibrate.

We plan to calibrate the instrument by this API, but we find out in
the real case we should calibrate the instrument before running the
Graphyte. Therefore we deprecate this function.

BUG= chromium:713589 
TEST=none

Change-Id: If2520054de2e263435736c4d81dda0f0245289d9
Reviewed-on: https://chromium-review.googlesource.com/483179
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>

[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/graphyte.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/sample/wait_inst.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/keysight/n1914a.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/__init__.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/anritsu/ml2437a.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/sample/dummy_inst.py

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/graphyte/+/a74b27b2fd674dc006d7cadff285defdcbeed425

commit a74b27b2fd674dc006d7cadff285defdcbeed425
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 14:17:33 2017

Remove inst.SelfCalibrate.

We plan to calibrate the instrument by this API, but we find out in
the real case we should calibrate the instrument before running the
Graphyte. Therefore we deprecate this function.

BUG= chromium:713589 
TEST=none

Change-Id: If2520054de2e263435736c4d81dda0f0245289d9
Reviewed-on: https://chromium-review.googlesource.com/483179
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>

[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/graphyte.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/sample/wait_inst.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/keysight/n1914a.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/__init__.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/anritsu/ml2437a.py
[modify] https://crrev.com/a74b27b2fd674dc006d7cadff285defdcbeed425/graphyte/inst/sample/dummy_inst.py

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/graphyte/+/bc2b13103ce78ca1ff99296b0762629317fb979e

commit bc2b13103ce78ca1ff99296b0762629317fb979e
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 14:17:33 2017

Remove TxConfig and RxConfig API.

Originally we plan to accelerate the execution time by parallelly
running the config function of DUT and instrument. But it turns
out that simplifying the API to make the development easier is
more important than the speed. Therefore, we combine the functions
to the later one. For example, the command sequence of Tx test is:

- dut.TxConfig
- inst.TxConfig
- dut.TxStart
- inst.TxMeasure
- dut.TxStop
- return inst.TxGetResult

So the logic of dut.TxConfig moves to dut.TxStart, and the logic of
isnt.TxConfig moves to inst.TxMeasure.

BUG= chromium:713589 
TEST=make test

Change-Id: I34a28722d9ec5c2db22728204056f7d1bb989a4c
Reviewed-on: https://chromium-review.googlesource.com/483180
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>

[modify] https://crrev.com/bc2b13103ce78ca1ff99296b0762629317fb979e/graphyte/dut/sample/dummy_dut.py
[modify] https://crrev.com/bc2b13103ce78ca1ff99296b0762629317fb979e/graphyte/graphyte.py
[modify] https://crrev.com/bc2b13103ce78ca1ff99296b0762629317fb979e/graphyte/inst/sample/wait_inst.py
[modify] https://crrev.com/bc2b13103ce78ca1ff99296b0762629317fb979e/graphyte/inst/keysight/n1914a.py
[modify] https://crrev.com/bc2b13103ce78ca1ff99296b0762629317fb979e/graphyte/inst/__init__.py
[modify] https://crrev.com/bc2b13103ce78ca1ff99296b0762629317fb979e/graphyte/inst/anritsu/ml2437a.py
[modify] https://crrev.com/bc2b13103ce78ca1ff99296b0762629317fb979e/graphyte/dut/__init__.py
[modify] https://crrev.com/bc2b13103ce78ca1ff99296b0762629317fb979e/graphyte/inst/sample/dummy_inst.py

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/graphyte/+/b2d7015c3721926cc39018e778790cd2c463534e

commit b2d7015c3721926cc39018e778790cd2c463534e
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 16:21:05 2017

Explicitly call the functions of RF controller.

We separate the plugin API to two layers: device layer and
RF controller layer. Originally, we called the function of the
RF controller by __getattr__, which means that if the device doesn't
have the function, then we find the function from the active
controller.

But it causes bug that both layers have "Initialize" and "Terminate"
functions. The functions of the RF controller will not be called and
it is confusing to find which function is called.

Now we explicitly call the RF controller function by:
device.active_controller.Function() instead of using __getattr__, and
change "_Initialize", "_Terminate" functions optional.

BUG= chromium:713589 
TEST=none

Change-Id: Ie34a71358d621b8b84b40d516aa1cde27e116bb0
Reviewed-on: https://chromium-review.googlesource.com/483260
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>

[modify] https://crrev.com/b2d7015c3721926cc39018e778790cd2c463534e/graphyte/device.py
[modify] https://crrev.com/b2d7015c3721926cc39018e778790cd2c463534e/graphyte/dut/sample/dummy_dut.py
[modify] https://crrev.com/b2d7015c3721926cc39018e778790cd2c463534e/graphyte/graphyte.py
[modify] https://crrev.com/b2d7015c3721926cc39018e778790cd2c463534e/graphyte/inst/sample/wait_inst.py
[modify] https://crrev.com/b2d7015c3721926cc39018e778790cd2c463534e/graphyte/inst/keysight/n1914a.py
[modify] https://crrev.com/b2d7015c3721926cc39018e778790cd2c463534e/graphyte/inst/__init__.py
[modify] https://crrev.com/b2d7015c3721926cc39018e778790cd2c463534e/graphyte/inst/anritsu/ml2437a.py
[modify] https://crrev.com/b2d7015c3721926cc39018e778790cd2c463534e/graphyte/dut/__init__.py
[modify] https://crrev.com/b2d7015c3721926cc39018e778790cd2c463534e/graphyte/inst/sample/dummy_inst.py

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/vendor/graphyte-litepoint/+/71ba91aad8a3ff41c373eda8cd74ab739da732b9

commit 71ba91aad8a3ff41c373eda8cd74ab739da732b9
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 16:21:05 2017

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/vendor/graphyte-litepoint/+/71ba91aad8a3ff41c373eda8cd74ab739da732b9

commit 71ba91aad8a3ff41c373eda8cd74ab739da732b9
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 16:21:05 2017

Project Member

Comment 9 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/vendor/graphyte-litepoint/+/a264ff3acf1f80f80142671dab9f1412d74b1e80

commit a264ff3acf1f80f80142671dab9f1412d74b1e80
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 16:21:05 2017

Project Member

Comment 10 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/vendor/graphyte-litepoint/+/775359e9af02f1352660aa033c5c086655c8c945

commit 775359e9af02f1352660aa033c5c086655c8c945
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 16:21:05 2017

Project Member

Comment 11 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/vendor/graphyte-litepoint/+/ce5b4ebef6805c4d0109cbab2caeff5fdec97a01

commit ce5b4ebef6805c4d0109cbab2caeff5fdec97a01
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 16:21:05 2017

Project Member

Comment 12 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/vendor/graphyte-litepoint/+/bbf8ba9660ea968cbc470d0faef8a089b32b48f9

commit bbf8ba9660ea968cbc470d0faef8a089b32b48f9
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Apr 26 16:21:06 2017

Project Member

Comment 13 by bugdroid1@chromium.org, Apr 27 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/overlays/overlay-eve-private/+/ecf00a924a02785d09f36a11a95ec2bab9d37c59

commit ecf00a924a02785d09f36a11a95ec2bab9d37c59
Author: Chih-Yu Huang <akahuang@google.com>
Date: Thu Apr 27 11:16:51 2017

Cc: akahuang@chromium.org
Owner: petershih@chromium.org
Project Member

Comment 15 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/graphyte/+/71b9f6d026d7d47de41c4f26063999ad49025f8b

commit 71b9f6d026d7d47de41c4f26063999ad49025f8b
Author: Chih-Yu Huang <akahuang@google.com>
Date: Thu Jul 13 13:51:36 2017

inst: Add VALID_PORT_NAMES field to declare the valid ports.

In the port config file, we maps each antenna of DUT to the port of
the instrument. VALID_PORTS field is used to declare the valid port
names of the instrument. Then we check the port name when we load
the port config.

BUG= chromium:713589 
TEST=make test

Change-Id: I6910e5b43c6853561fafb4d444b5c706b470cf61
Reviewed-on: https://chromium-review.googlesource.com/569280
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Shen-En Shih <petershih@chromium.org>

[modify] https://crrev.com/71b9f6d026d7d47de41c4f26063999ad49025f8b/graphyte/inst/sample/wait_inst.py
[modify] https://crrev.com/71b9f6d026d7d47de41c4f26063999ad49025f8b/graphyte/inst/__init__.py
[modify] https://crrev.com/71b9f6d026d7d47de41c4f26063999ad49025f8b/graphyte/inst/keysight/n1914a.py
[modify] https://crrev.com/71b9f6d026d7d47de41c4f26063999ad49025f8b/graphyte/config_files/sample_port_config.json
[modify] https://crrev.com/71b9f6d026d7d47de41c4f26063999ad49025f8b/graphyte/inst/anritsu/ml2437a.py
[modify] https://crrev.com/71b9f6d026d7d47de41c4f26063999ad49025f8b/graphyte/inst/sample/dummy_inst.py

Project Member

Comment 16 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/vendor/graphyte-litepoint/+/81542f706c512a95d5c89e747894cefdb334fc55

commit 81542f706c512a95d5c89e747894cefdb334fc55
Author: Chih-Yu Huang <akahuang@google.com>
Date: Thu Jul 13 18:44:43 2017

Project Member

Comment 17 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/graphyte/+/cc6ec7c05761cee1801a75e6678fc2042f8b9783

commit cc6ec7c05761cee1801a75e6678fc2042f8b9783
Author: Chih-Yu Huang <akahuang@google.com>
Date: Fri Jul 14 00:30:28 2017

graphyte: Add unittest for Graphyte core class.

Added a unittest to check the calling sequence of DUT and instrument
plugins.

BUG= chromium:713589 
TEST=make test

Change-Id: I5f253f73e6684667d12a15a99a35be4bb6727b97
Reviewed-on: https://chromium-review.googlesource.com/561257
Commit-Ready: Shen-En Shih <petershih@chromium.org>
Tested-by: Shen-En Shih <petershih@chromium.org>
Reviewed-by: Shen-En Shih <petershih@chromium.org>

[add] https://crrev.com/cc6ec7c05761cee1801a75e6678fc2042f8b9783/graphyte/graphyte_unittest.py

Project Member

Comment 18 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/graphyte/+/2d565480441b168084b4b962f79ee781d96c0546

commit 2d565480441b168084b4b962f79ee781d96c0546
Author: Chih-Yu Huang <akahuang@google.com>
Date: Fri Jul 14 00:30:28 2017

device: Check the change of RF type in device class.

Originally, we checked the change RF type in Graphyte core class,
because DUT and instrument plugins should change at the same time
during running.

However, we will implement a plugin runner that might only run one
device. Therefore, we moved the check to the device itself.

BUG= chromium:713589 
TEST=make test

Change-Id: I544a5e49388a58930c22048fa9d36e7343fed2d4
Reviewed-on: https://chromium-review.googlesource.com/561258
Commit-Ready: Shen-En Shih <petershih@chromium.org>
Tested-by: Shen-En Shih <petershih@chromium.org>
Reviewed-by: Shen-En Shih <petershih@chromium.org>

[modify] https://crrev.com/2d565480441b168084b4b962f79ee781d96c0546/graphyte/graphyte_unittest.py
[modify] https://crrev.com/2d565480441b168084b4b962f79ee781d96c0546/graphyte/device.py
[modify] https://crrev.com/2d565480441b168084b4b962f79ee781d96c0546/graphyte/graphyte.py
[add] https://crrev.com/2d565480441b168084b4b962f79ee781d96c0546/graphyte/device_unittest.py

Project Member

Comment 19 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/graphyte/+/69129a35cd1cc5c25229eebec3841869e6edbb92

commit 69129a35cd1cc5c25229eebec3841869e6edbb92
Author: Chih-Yu Huang <akahuang@google.com>
Date: Fri Jul 14 00:30:28 2017

graphyte: Split the plugin controlling methods.

In Graphyte core class, some methods are used to control both DUT
and instrument plugins at the same time:
  - InitializeDevices
  - TerminateDevices
  - SetRF

When we implement the plugin runner, it might control only one side
of the plugins. Therefore, we added a class DeviceType used to assign
which plugin should be controlled.

BUG= chromium:713589 
TEST=make test

Change-Id: I456c02698441223215fee824cb730b6a3bf29284
Reviewed-on: https://chromium-review.googlesource.com/561259
Commit-Ready: Shen-En Shih <petershih@chromium.org>
Tested-by: Shen-En Shih <petershih@chromium.org>
Reviewed-by: Shen-En Shih <petershih@chromium.org>

[modify] https://crrev.com/69129a35cd1cc5c25229eebec3841869e6edbb92/graphyte/device.py
[modify] https://crrev.com/69129a35cd1cc5c25229eebec3841869e6edbb92/graphyte/graphyte.py

Project Member

Comment 20 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/graphyte/+/d6a8e7704e8257c9d6dd866889fca3d5192b0c30

commit d6a8e7704e8257c9d6dd866889fca3d5192b0c30
Author: Chih-Yu Huang <akahuang@google.com>
Date: Fri Jul 14 05:03:33 2017

Implement plugin running shell.

A plugin runner is implemented to help diagnosis
in graphyte framework when deploying, testing, etc.

The plugin runner is a interactive shell, and it
should be self-explained. Type 'help' in the command
prompt shows an informative usage guide.

BUG= chromium:713589 
TEST=none

Change-Id: Ibed1acafa94352fae8514a0ffead3b938a5eecd7
Reviewed-on: https://chromium-review.googlesource.com/561260
Commit-Ready: Shen-En Shih <petershih@chromium.org>
Tested-by: Shen-En Shih <petershih@chromium.org>
Reviewed-by: Chih-Yu Huang <akahuang@chromium.org>

[add] https://crrev.com/d6a8e7704e8257c9d6dd866889fca3d5192b0c30/graphyte/plugin_shell_unittest.py
[modify] https://crrev.com/d6a8e7704e8257c9d6dd866889fca3d5192b0c30/graphyte/device.py
[modify] https://crrev.com/d6a8e7704e8257c9d6dd866889fca3d5192b0c30/graphyte/links/ssh.py
[add] https://crrev.com/d6a8e7704e8257c9d6dd866889fca3d5192b0c30/graphyte/plugin_shell.py
[modify] https://crrev.com/d6a8e7704e8257c9d6dd866889fca3d5192b0c30/graphyte/graphyte.py
[modify] https://crrev.com/d6a8e7704e8257c9d6dd866889fca3d5192b0c30/graphyte/graphyte_unittest.py
[modify] https://crrev.com/d6a8e7704e8257c9d6dd866889fca3d5192b0c30/graphyte/main.py

Comment 21 Deleted

Comment 22 Deleted

Owner: ----
Status: Fixed (was: Untriaged)
This issue can be considered as done. Review the goals mentioned in #1:

* Consider a standard procedure to verify a new-development DUT plugin.
--> we have dummy instrument plugin. this should be enough for vendors to develop DUT plugins.

* Implement plugin runner to execute one-step for debugging.
--> DONE

* Remove the unused API (TxConfig, RxConfig, SelfCalibrate, ...)
--> DONE

* Define the capability of the plugin.
--> DONE (maybe partially, #15)

* Write the unittest for framework side.
--> DONE

Sign in to add a comment