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

Issue 689944 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature

Blocked on:
issue 779466
issue 796556



Sign in to add a comment

Integrate probe framework to HWID and AVL

Project Member Reported by akahuang@chromium.org, Feb 8 2017

Issue description

Originally, we use "gooftool probe" tool to probe the component, and then generate HWID. It works fine with most common components, but there are more and more components need special probing method. So the maintenance become more and more complicated.

To solve this issue, we implemented a new probe framework. (issue 667651) Now we should replace gooftool by the new one. The goal is:

- Split hardware and software in HWID.
  Only verify software values, not encoded into HWID string.
- Integrate new probe framework with HWID generation
  Replace the active probing "gooftool probe" by the passive probing.
- Integrate new probe framework with AVL
  Generate the probe statement by selecting used component from AVL.
- Easy transfer from reference board to following device.

The document is here:
https://docs.google.com/document/d/1waGEK2DurNU2EwoauKd5KdlmsTpszOz_IBU8r0Vw4DA/edit#heading=h.4f2bfl5bnuef
 

Comment 1 by nsale@chromium.org, Feb 8 2017

Cc: moch@chromium.org
Cc: marcochen@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 22 2017

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

commit b9d9d9b38342c8254a12a986e6386d30022877d2
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Feb 22 08:35:23 2017

probe: search all possible EDID file when path is not given.

When the EDID file path or the I2C bus number is not given, the
probe function will search all possible paths.
Ported from gooftool/probe.py

BUG=chromium:689944
TEST=make test

Change-Id: I6253ddf1976191b346f7500c3554ba24bc69db31
Reviewed-on: https://chromium-review.googlesource.com/440767
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Chih-Yu Huang <akahuang@chromium.org>

[modify] https://crrev.com/b9d9d9b38342c8254a12a986e6386d30022877d2/py/probe/functions/edid.py

Project Member

Comment 4 by bugdroid1@chromium.org, Feb 22 2017

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

commit 2d1b846228f86c58de62d9918fc47018bfd1ff23
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Feb 22 08:35:23 2017

probe: Port input_device probe function from gooftool.

In this CL, we add the device_type argument into the function. This
argument could be touchscreen, touchpad, or stylus. Also remove the
arguments for filtering the result, because it should be done at
match function.

BUG=chromium:689944
TEST=py/probe/functions/input_device_unittest.py

Change-Id: I851a25a78b425b4c02b346366792f6eafa662498
Reviewed-on: https://chromium-review.googlesource.com/442251
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>

[modify] https://crrev.com/2d1b846228f86c58de62d9918fc47018bfd1ff23/py/probe/functions/input_device.py
[modify] https://crrev.com/2d1b846228f86c58de62d9918fc47018bfd1ff23/py/probe/functions/input_device_unittest.py

Project Member

Comment 5 by bugdroid1@chromium.org, Mar 16 2017

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

commit 14ac89a916fb0c38775cb865a5c9f8abdf9d2bdd
Author: Chih-Yu Huang <akahuang@google.com>
Date: Thu Mar 16 07:11:47 2017

probe: add "--legacy-output" argument to output legacy probe result.

To replace "gooftool probe" by the new probe framework, we add a
argument to output the probe result in the legacy Yaml format.

BUG=chromium:689944
TEST=make test

Change-Id: I8a8f7ebbbd82b50df4575d1377c618abbe252b21
Reviewed-on: https://chromium-review.googlesource.com/442409
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/14ac89a916fb0c38775cb865a5c9f8abdf9d2bdd/py/probe/function.py
[modify] https://crrev.com/14ac89a916fb0c38775cb865a5c9f8abdf9d2bdd/py/probe/probe_cmdline_unittest.py
[modify] https://crrev.com/14ac89a916fb0c38775cb865a5c9f8abdf9d2bdd/py/probe/probe_cmdline.py

Comment 6 by moch@chromium.org, Mar 21 2017

Cc: -moch@chromium.org
Cc: -marcochen@chromium.org akahuang@chromium.org
Owner: yhong@chromium.org
Project Member

Comment 8 by bugdroid1@chromium.org, May 10 2017

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

commit 1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed May 10 09:08:30 2017

probe: port `gooftool/probe.py` to probe generic functions.

In order to replace gooftool by the new probe framework, we need to
provide the generic probe function for each device. In this CL, we
ported the probe function for each component from `gooftool/probe.py`.

BUG=chromium:689944
TEST=none

Change-Id: Ia0f28b578296c37fc3c65752d38f43024e01eac1
Reviewed-on: https://chromium-review.googlesource.com/455599
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Yong Hong <yhong@chromium.org>

[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/generic_network_device.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/generic_usb_hosts.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/generic_tpm.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/generic_video.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/generic_audio_codec.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/generic_dram.py
[modify] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/vpd.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/generic_storage.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/glob_path.py
[modify] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/probe_cmdline.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/chromeos_firmware.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/generic_cpu.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/generic_battery.py
[add] https://crrev.com/1ecb34c0a94b6b56e19b7bfd24a62fcade4ef943/py/probe/functions/generic_bluetooth.py

Project Member

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

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

commit b8c6468272e59fc1686be8b4cd063076040da7ae
Author: Yong Hong <yhong@chromium.org>
Date: Thu Jun 01 21:43:48 2017

probe: Strip the whitespace from probe result

`generic_dram` probe function should return strings without
whitespace at the beginning and the end.

BUG=chromium:689944
TEST=manually test on DUT

Change-Id: Id82ed664bee8c6a6ef99c71d095427c182f6e8df
Reviewed-on: https://chromium-review.googlesource.com/518644
Commit-Ready: Yong Hong <yhong@chromium.org>
Tested-by: Yong Hong <yhong@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/b8c6468272e59fc1686be8b4cd063076040da7ae/py/probe/functions/generic_dram.py

Project Member

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

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

commit b8c6468272e59fc1686be8b4cd063076040da7ae
Author: Yong Hong <yhong@chromium.org>
Date: Thu Jun 01 21:43:48 2017

probe: Strip the whitespace from probe result

`generic_dram` probe function should return strings without
whitespace at the beginning and the end.

BUG=chromium:689944
TEST=manually test on DUT

Change-Id: Id82ed664bee8c6a6ef99c71d095427c182f6e8df
Reviewed-on: https://chromium-review.googlesource.com/518644
Commit-Ready: Yong Hong <yhong@chromium.org>
Tested-by: Yong Hong <yhong@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/b8c6468272e59fc1686be8b4cd063076040da7ae/py/probe/functions/generic_dram.py

Project Member

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

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

commit 79308b256d14243b9ffae02041d3cbc077804e0c
Author: Chih-Yu Huang <akahuang@google.com>
Date: Fri Jul 14 08:44:44 2017

probe: implement `probe search` command.

In this CL, we implemented a new command `search` at probe cmdline.
This command searches the components at the common place, just like
`gooftool probe` did.

BUG=chromium:689944
TEST=Run "probe search" at device.

Change-Id: I3bc87af3be9f5c6ee49905174c2c3f16b81d91ac
Reviewed-on: https://chromium-review.googlesource.com/455600
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Yong Hong <yhong@chromium.org>

[modify] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/hwid/v3/builder_unittest.py
[add] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/probe/common_unittest.py
[add] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/probe/statement.schema.json
[modify] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/probe/probe_cmdline.py
[add] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/probe/generic_statement.json
[add] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/probe/search.py
[add] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/probe/common.py
[modify] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/probe/probe_cmdline_unittest.py
[add] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/probe/volatile_statement.json
[modify] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/hwid/v3/builder.py
[modify] https://crrev.com/79308b256d14243b9ffae02041d3cbc077804e0c/py/test/pytests/probe/probe.py

Comment 12 by yhong@chromium.org, Oct 30 2017

Blockedon: 779466

Comment 13 by yhong@chromium.org, Dec 20 2017

Blockedon: 796556
Project Member

Comment 14 by bugdroid1@chromium.org, Feb 6 2018

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

commit f008bd7135c3209a94468d570eaffdb76915d567
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:20:57 2018

hwid: Revises the format of probed results from yaml to json.

This CL deprecates the legacy yaml-formatted probed results for the
HWID framework by the json-formatted one, which matches the output
of the new probe framework.

BUG=chromium:689944
TEST=make test

Change-Id: If534674694c58dcfa59d1040359718569586dfa7
Reviewed-on: https://chromium-review.googlesource.com/842762
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Cheng-Han Yang <chenghan@chromium.org>

[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/probe/probe_cmdline.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/dome/backend/models.py
[add] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/testdata/test_probe_result_hwid_utils.json
[add] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/testdata/new_test_probe_result_hwid_utils.json
[delete] https://crrev.com/017fe30e697d71730e5217ea9830a4f52c8c7bca/py/hwid/v3/testdata/new_test_probe_result_hwid_utils.yaml
[delete] https://crrev.com/017fe30e697d71730e5217ea9830a4f52c8c7bca/py/hwid/v3/testdata/test_builder_probe_results.yaml
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/hwid_cmdline.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/hwid_utils_unittest.py
[add] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/utils/json_utils_unittest.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/common_unittest.py
[add] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/utils/testdata/json_utils_unittest.json
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/encoder_unittest.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/database.py
[add] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/testdata/test_probe_result.json
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/probe/probe_cmdline_unittest.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/utils/json_utils.py
[delete] https://crrev.com/017fe30e697d71730e5217ea9830a4f52c8c7bca/py/hwid/v3/testdata/test_probe_result_hwid_utils.yaml
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/valid_hwid_db_unittest.py
[add] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/testdata/test_builder_probe_results.json
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/umpire/server/migrate.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/umpire/server/config.py
[delete] https://crrev.com/017fe30e697d71730e5217ea9830a4f52c8c7bca/py/hwid/v3/testdata/test_probe_result.yaml
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/database_unittest.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/hwid_utils.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/decoder_unittest.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/gooftool/core.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/common.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/gooftool/commands.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/hwid_rule_functions_unittest.py
[add] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/probe/probe_utils_unittest.py
[modify] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/hwid/v3/builder.py
[add] https://crrev.com/f008bd7135c3209a94468d570eaffdb76915d567/py/probe/probe_utils.py

Project Member

Comment 15 by bugdroid1@chromium.org, Feb 6 2018

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

commit b157bfe6fa0767638557dd7b7eca67c9408a9a60
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:21:00 2018

hwid: Extracts the binary_string/encoded_string into `Identity` class.

Extracts the binary_string, encoded_string attributes from the HWID
object into a unique class called `Identity`.

TEST=make test
BUG=chromium:689944

Change-Id: I8dcb47fbc459dfb28abcc2d222037d7bc5ed660a
Reviewed-on: https://chromium-review.googlesource.com/844399
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[add] https://crrev.com/b157bfe6fa0767638557dd7b7eca67c9408a9a60/py/hwid/v3/identity.py
[modify] https://crrev.com/b157bfe6fa0767638557dd7b7eca67c9408a9a60/py/hwid/v3/decoder.py
[modify] https://crrev.com/b157bfe6fa0767638557dd7b7eca67c9408a9a60/py/hwid/v3/common_unittest.py
[modify] https://crrev.com/b157bfe6fa0767638557dd7b7eca67c9408a9a60/py/hwid/v3/common.py
[modify] https://crrev.com/b157bfe6fa0767638557dd7b7eca67c9408a9a60/py/hwid/v3/encoder.py

Project Member

Comment 16 by bugdroid1@chromium.org, Feb 6 2018

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

commit 5859ba53fb5615f27d01ca4c688b154a14cca154
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:20:59 2018

hwid: Extracts the BOM class into a separate module.

This CL extracts the BOM class from `cros.factory.hwid.v3.common`
module into a separate module `cros.factory.hwid.v3.bom`.

TEST=make test
BUG=chromium:689944

Change-Id: I82088c5c6ce9721495edeb229ff5bdde4b6b466f
Reviewed-on: https://chromium-review.googlesource.com/844437
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[add] https://crrev.com/5859ba53fb5615f27d01ca4c688b154a14cca154/py/hwid/v3/bom.py
[modify] https://crrev.com/5859ba53fb5615f27d01ca4c688b154a14cca154/py/hwid/v3/decoder.py
[modify] https://crrev.com/5859ba53fb5615f27d01ca4c688b154a14cca154/py/hwid/v3/database.py
[modify] https://crrev.com/5859ba53fb5615f27d01ca4c688b154a14cca154/py/hwid/v3/common.py
[modify] https://crrev.com/5859ba53fb5615f27d01ca4c688b154a14cca154/py/hwid/v3/hwid_utils.py

Project Member

Comment 17 by bugdroid1@chromium.org, Feb 6 2018

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

commit 3a75e0e0274512e20a3d648ec43948548453f2d2
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:21:01 2018

hwid: Decouples the probed results and the hwid v3 framework.

This is the first step of decoupling the probed results and the HWID
database.  As the `components` fields in the HWID database becomes
optional, the relation between the probed results and the HWID database
become weak.  Both the material to generate a HWID string and the result
of decoding a HWID string should be a BOM object.

TEST=make test
BUG=chromium:689944

Change-Id: I9da3778d51094a9228d8980aa1df93d474a3e09a
Reviewed-on: https://chromium-review.googlesource.com/844438
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/common_unittest.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/valid_hwid_db_unittest.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/decoder_unittest.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/encoder_unittest.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/database.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/gooftool/commands.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/database_unittest.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/hwid_utils.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/hwid_rule_functions_unittest.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/hwid_cmdline.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/common.py
[modify] https://crrev.com/3a75e0e0274512e20a3d648ec43948548453f2d2/py/hwid/v3/hwid_utils_unittest.py

Project Member

Comment 18 by bugdroid1@chromium.org, Feb 6 2018

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

commit 5c6dcd5b660b24e044d77dfd2f2a663e9aa20428
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:21:03 2018

hwid: Revises the structure of the RuleContext class.

This CL flattens the `hwid` property in a rule context object into
`database`, `bom` and `mode`.  The final goal is to deprecate the
class `common.HWID`.

TEST=make test
BUG=chromium:689944

Change-Id: Ia1a2dacfbe5c9640e44cd01d935add86a7f7dd12
Reviewed-on: https://chromium-review.googlesource.com/845478
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yong Hong <yhong@google.com>

[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/test/pytests/hwid.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/hwid_rule_functions.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/common_unittest.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/valid_hwid_db_unittest.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/test/event_log_unittest.py
[add] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/transformer_unittest.py
[delete] https://crrev.com/c376541244ad282d5678173894982a50bec3b051/py/hwid/v3/decoder_unittest.py
[delete] https://crrev.com/c376541244ad282d5678173894982a50bec3b051/py/hwid/v3/decoder.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/gooftool/core.py
[delete] https://crrev.com/c376541244ad282d5678173894982a50bec3b051/py/hwid/v3/encoder_unittest.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/device/info.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/database.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/gooftool/commands.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/database_unittest.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/hwid_utils.py
[delete] https://crrev.com/c376541244ad282d5678173894982a50bec3b051/py/hwid/v3/encoder.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/bom.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/hwid_rule_functions_unittest.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/hwid_cmdline.py
[add] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/transformer.py
[modify] https://crrev.com/5c6dcd5b660b24e044d77dfd2f2a663e9aa20428/py/hwid/v3/common.py

Project Member

Comment 19 by bugdroid1@chromium.org, Feb 6 2018

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

commit cbdb87aa22f9197e325445e9f612e1c947c1ed5f
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:21:04 2018

hwid: Simplifies the `transformer` module.

This CL moves the logics between the binary string and encode string
into the package `cros.factory.hwid.v3.identity` so that
`cros.factory.hwid.v3.transformer` can focus on encoding/decoding the
BOM.

TEST=make test
BUG=chromium:689944

Change-Id: I68a89baef17f63bca5d4825a1e217e9709970318
Reviewed-on: https://chromium-review.googlesource.com/845661
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/base32.py
[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/identity.py
[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/common_unittest.py
[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/base8192_unittest.py
[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/transformer_unittest.py
[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/database.py
[add] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/identity_unittest.py
[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/base8192.py
[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/base32_unittest.py
[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/transformer.py
[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/common.py
[modify] https://crrev.com/cbdb87aa22f9197e325445e9f612e1c947c1ed5f/py/hwid/v3/valid_hwid_db_unittest.py

Project Member

Comment 20 by bugdroid1@chromium.org, Feb 6 2018

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

commit 1a051212c7888d22639a0b0f657fab725be50d40
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:21:05 2018

hwid: Revise the timing of evaluating device_info rules.

This CL let the device_info rules be evaluated before calling
`transformer.Encode` so that `common.HWID` object can assume the given
`BOM` object is freezed and don't need to re-generate the
binary_string every time.

TEST=make test
BUG=chromium:689944

Change-Id: I1c0c7ab2d171b1963f1459af208b625647e56114
Reviewed-on: https://chromium-review.googlesource.com/845665
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[modify] https://crrev.com/1a051212c7888d22639a0b0f657fab725be50d40/py/hwid/v3/common_unittest.py
[modify] https://crrev.com/1a051212c7888d22639a0b0f657fab725be50d40/py/hwid/v3/transformer_unittest.py
[modify] https://crrev.com/1a051212c7888d22639a0b0f657fab725be50d40/py/hwid/v3/hwid_utils.py
[modify] https://crrev.com/1a051212c7888d22639a0b0f657fab725be50d40/py/hwid/v3/hwid_rule_functions_unittest.py
[modify] https://crrev.com/1a051212c7888d22639a0b0f657fab725be50d40/py/hwid/v3/transformer.py
[modify] https://crrev.com/1a051212c7888d22639a0b0f657fab725be50d40/py/hwid/v3/common.py

Project Member

Comment 21 by bugdroid1@chromium.org, Feb 6 2018

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

commit f3c74665fb487794dd5a268e085ed2c79b09ef5b
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:21:06 2018

hwid: Removes `HWID` class.

This CL removes the class `HWID` in the package `common` because it
is not necessary and have no any functions.

TEST=make test
BUG=chromium:689944

Change-Id: Ic9e4fcbb413c41186fd7f89f47ce94dd83efd382
Reviewed-on: https://chromium-review.googlesource.com/846619
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/identity.py
[delete] https://crrev.com/1a051212c7888d22639a0b0f657fab725be50d40/py/hwid/v3/common_unittest.py
[add] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/verifier.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/valid_hwid_db_unittest.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/transformer_unittest.py
[add] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/verifier_unittest.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/database.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/database_unittest.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/hwid_utils.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/identity_unittest.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/hwid_rule_functions_unittest.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/hwid_cmdline.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/transformer.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/common.py
[modify] https://crrev.com/f3c74665fb487794dd5a268e085ed2c79b09ef5b/py/hwid/v3/hwid_utils_unittest.py

Project Member

Comment 22 by bugdroid1@chromium.org, Feb 6 2018

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

commit 724a7712c6dd970c64ebfbc6dfe1e7222a0b223d
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:21:07 2018

hwid: Stops verifying encoding/decoding in `valid_hwid_db_unittest`.

Code for encoding and decoding the HWID for legacy Chromebook project
is located in the factory branch.  It's difficult to make sure
these process always work in the master branch.

BUG=chromium:689944
TEST=make test

Change-Id: Ifc7a97a1cd1cf352bfefb3f637e9b444322af6cc
Reviewed-on: https://chromium-review.googlesource.com/851515
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[modify] https://crrev.com/724a7712c6dd970c64ebfbc6dfe1e7222a0b223d/py/hwid/v3/valid_hwid_db_unittest.py

Project Member

Comment 23 by bugdroid1@chromium.org, Feb 6 2018

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

commit e73bc25c8d9b29e1a3f5ae7a8a0d8aa93916bfa2
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:21:08 2018

hwid: Removes useless rules.

This CL removes below two rules:
  * CheckRegistrationCode
  * ValidVPDValue

Both the registration code and the vpd data will be verified by
`gooftool verify` command during the finalize process.  It's redundant
to check those data by the HWID v3 framework.

BUG=chromium:689944
TEST=make test

Change-Id: Ic21e27da3a55ca027836cfd3208e14809be2799a
Reviewed-on: https://chromium-review.googlesource.com/851516
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[modify] https://crrev.com/e73bc25c8d9b29e1a3f5ae7a8a0d8aa93916bfa2/py/hwid/v3/hwid_rule_functions.py
[modify] https://crrev.com/e73bc25c8d9b29e1a3f5ae7a8a0d8aa93916bfa2/py/hwid/v3/hwid_rule_functions_unittest.py

Project Member

Comment 24 by bugdroid1@chromium.org, Feb 6 2018

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

commit 1534db75e584a728b06d6a063d36a1ac6d4e2446
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:21:09 2018

hwid: Simplifies the unittest for `hwid_rule_functions` module.

This CL let the unittest only focus on testing functions defined
in `hwid_rule_functions` module and don't depend on other modules.

BUG=chromium:689944
TEST=make test

Change-Id: I26c197eed83e0dc75d4b260056140af99118e607
Reviewed-on: https://chromium-review.googlesource.com/851517
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[modify] https://crrev.com/1534db75e584a728b06d6a063d36a1ac6d4e2446/py/hwid/v3/hwid_rule_functions_unittest.py
[modify] https://crrev.com/1534db75e584a728b06d6a063d36a1ac6d4e2446/py/hwid/v3/database.py
[add] https://crrev.com/1534db75e584a728b06d6a063d36a1ac6d4e2446/py/hwid/v3/testdata/test_hwid_rule_functions_db.yaml

Project Member

Comment 25 by bugdroid1@chromium.org, Feb 6 2018

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

commit ada8e0ee7b0959f312d5906acc2e530387ffe372
Author: Yong Hong <yhong@chromium.org>
Date: Tue Feb 06 20:21:11 2018

hwid: Refactors the HWID v3 framework.

This CL does:
  1. Simplify the BOM class to record only `encoding_pattern_index`,
     `image_id` and `components` because only these 3 items are enough
     for encoding.
  2. Revise the `transformer` module to match the change of `BOM`.
  3. Re-write the unittest for `transformer` module so that it only test
     whether that module works or not.
  4. Revise the `verifier` module to match the change of `BOM`.
  5. Re-write the unittest for `verifier` module so that it only test
     whether that module works or not.
  6. Remove unused method in `database` module.
  7. Re-write the test code for `hwid_utils` module by a clear way
     as now `BOM` class is much more simplier.
  8. Adds unittest for `hwid_cmdline`.

BUG=chromium:689944
TEST=make test

Change-Id: I3034cb131b36df9996539b401bc7e5b394c077da
Reviewed-on: https://chromium-review.googlesource.com/861685
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Yong Hong <yhong@google.com>

[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/hwid_rule_functions.py
[delete] https://crrev.com/27e5d03938b1fd86d1c58e35326c023928b9a822/py/hwid/v3/testdata/test_probe_result_hwid_utils.json
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/yaml_tags.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/test_db.yaml
[add] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/TEST_PROJECT_invalid_probed_results
[add] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/test_transformer_db.yaml
[delete] https://crrev.com/27e5d03938b1fd86d1c58e35326c023928b9a822/py/hwid/v3/testdata/new_test_probe_result_hwid_utils.json
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/TEST_PROJECT
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/hwid_cmdline.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/hwid_utils_unittest.py
[delete] https://crrev.com/27e5d03938b1fd86d1c58e35326c023928b9a822/py/hwid/v3/testdata/test_new_db.yaml
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/identity.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/verifier.py
[add] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/TEST_PROJECT_probed_results
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/transformer_unittest.py
[delete] https://crrev.com/27e5d03938b1fd86d1c58e35326c023928b9a822/py/hwid/v3/testdata/NEW_TEST_PROJECT
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/database.py
[add] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/hwid_cmdline_unittest.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/identity_unittest.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/bom.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/verifier_unittest.py
[delete] https://crrev.com/27e5d03938b1fd86d1c58e35326c023928b9a822/py/hwid/v3/testdata/test_probe_result.json
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/tools/deps.conf
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/database_unittest.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/hwid_utils.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/test/pytests/hwid.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/test_db_no_checksum.yaml
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/utils/type_utils.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/gooftool/commands.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/hwid_rule_functions_unittest.py
[modify] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/transformer.py

Project Member

Comment 26 by bugdroid1@chromium.org, Feb 7 2018

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

commit 3532ae8d06d4288a7c697cdbcf85854c4fb74ce7
Author: Yong Hong <yhong@chromium.org>
Date: Wed Feb 07 02:18:32 2018

hwid: Rewrites `database.py` and its unittest.

This CL rewrites `database.py` so that it only focuses on
loading/saving/manipulating a HWID database and has a well-defined
interfaces for other module to access the database.  This CL also
adds completely documents about the format of a HWID database file
as comments in `database.py`.

TEST=make test
BUG=chromium:689944
CQ-DEPEND=CL:*546098,CL:*546094

Change-Id: Ie5fbc7b45b9b0a37e6b4584a48fbcbaf35a3e05d
Reviewed-on: https://chromium-review.googlesource.com/866614
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/hwid_rule_functions.py
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/utils/schema.py
[delete] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/test_db.yaml
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/testdata/TEST_PROJECT
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/hwid_cmdline.py
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/hwid_utils_unittest.py
[add] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/testdata/test_database_db.yaml
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/verifier.py
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/transformer_unittest.py
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/service/validator.py
[add] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/testdata/test_database_db_missing_component.yaml
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/database.py
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/identity_unittest.py
[delete] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/test_db_wrong_checksum_field.yaml
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/service/testdata/NEW_TEST_BOARD
[add] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/testdata/test_database_db_missing_encoded_field.yaml
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/verify_db_pattern.py
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/rule.py
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/valid_hwid_db_unittest.py
[delete] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/test_db_legacy.yaml
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/utils/schema_unittest.py
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/service/testdata/NEW_TEST_BOARD.golden
[delete] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/test_db_regions.yaml
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/database_unittest.py
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/hwid_utils.py
[add] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/testdata/test_database_db_missing_pattern.yaml
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/service/testdata/TEST_BOARD
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/verifier_unittest.py
[delete] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/test_db_no_checksum.yaml
[delete] https://crrev.com/ada8e0ee7b0959f312d5906acc2e530387ffe372/py/hwid/v3/testdata/test_db_duplicated_keys.yaml
[add] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/testdata/test_database_db_bad_checksum.yaml
[modify] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/transformer.py

Project Member

Comment 27 by bugdroid1@chromium.org, Feb 7 2018

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

commit 2c39bf20fd37ef784408a85d1b95260151bb40e8
Author: Yong Hong <yhong@chromium.org>
Date: Wed Feb 07 02:18:34 2018

hwid: Rewrites `DatabaseBuilder` class and its unittest.

In previous CLs we implemented method for manipulating a HWID database
object in `Database` class and we also removed some complex logics
such as "probeable" from the database.  It's time to rewrite the
builder for the database in a simpler way.

This CL also moves the probing related functions from `hwid_utils`
module into a individual module to focus on "how to use the probe
tool to know what components are installed on the device".

TEST=make test; manually test all functions of hwid tools on DUT
BUG=chromium:689944
CQ-DEPEND=CL:*553738,CL:*553758

Change-Id: I2e79298ff49b304b9c17be1dfa21e95ec8c12232
Reviewed-on: https://chromium-review.googlesource.com/885343
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Yong Hong <yhong@google.com>
Reviewed-by: Cheng-Han Yang <chenghan@chromium.org>

[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/hwid_rule_functions.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/testdata/test_verifier_db.yaml
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/verify_db_pattern.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/yaml_tags.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/testdata/test_transformer_db.yaml
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/yaml_tags_unittest.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/testdata/TEST_PROJECT
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/hwid_cmdline.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/hwid_utils_unittest.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/identity.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/verifier.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/transformer_unittest.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/service/validator.py
[add] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/testdata/test_probe_db.yaml
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/database.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/hwid_cmdline_unittest.py
[add] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/testdata/test_builder_db.yaml
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/common.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/builder_unittest.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/rule.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/valid_hwid_db_unittest.py
[delete] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/testdata/test_builder_probe_results.json
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/database_unittest.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/hwid_utils.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/base32.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/base8192.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/transformer.py
[add] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/probe.py
[delete] https://crrev.com/3532ae8d06d4288a7c697cdbcf85854c4fb74ce7/py/hwid/v3/testdata/test_db_builder.yaml
[add] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/probe_unittest.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/gooftool/commands.py
[modify] https://crrev.com/2c39bf20fd37ef784408a85d1b95260151bb40e8/py/hwid/v3/builder.py

Status: Assigned (was: Untriaged)
This bug has an owner, thus, it's been triaged. Changing status to "assigned".

Sign in to add a comment