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

Issue 658151 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

factory: make goofy portable on different platform

Project Member Reported by shunhsingou@chromium.org, Oct 21 2016

Issue description

We'd like to make our manufacturing software portable on different platforms, so that it can act as following roles:

1. Loaded on Chromebook during it's manufacturing to do tasks like hw tests, finalization, logging, provisioning, calibration, etc.
2. Extend chromium:557573, which allows us to test DUT with a Chromebook station, to test DUT with a general Linux or Windows station.
3. Loaded on non-Chrome OS device, or headless Chrome OS device, to perform task like run-in tests.

To achieve our goal, following refactoring steps are required in goofy:
1. Modularize goofy - move all platform dependent code into separated "plugins" that can be loaded in different scenarios.
2. Support running goofy pytest without enable Goofy UI.
3. Make all platform dependent paths configurable.
 

Comment 1 Deleted

Cc: hungte@chromium.org stimim@chromium.org
Description: Show this description
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 1 2016

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

commit fbca86a8def5f000357f397e1f91b6f691e28b63
Author: Wei-Han Chen <stimim@google.com>
Date: Mon Oct 24 08:39:28 2016

goofy cleanup: remove unused 'show_next_active_test'

This function is not used by anyone, remove it.

BUG=b:31678190, chromium:658151 
TEST=run goofy/goofy_unittest.py

Change-Id: I3b4f853e1d991ce2edea202bcafb408d119a7563
Reviewed-on: https://chromium-review.googlesource.com/400984
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/fbca86a8def5f000357f397e1f91b6f691e28b63/py/test/event.py
[modify] https://crrev.com/fbca86a8def5f000357f397e1f91b6f691e28b63/py/goofy/goofy.py

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 1 2016

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

commit 2435f867209df0c206e9b261e1147b1e0f7fece6
Author: Wei-Han Chen <stimim@google.com>
Date: Mon Oct 24 08:25:34 2016

goofy cleanup: remove unused function 're_run_failed'

This function is not using by anyone, remove it.

BUG=b:31678190, chromium:658151 
TEST=run goofy/goofy_unittest.py

Change-Id: Ie11c9b10ba42fc2657eccf7b0b6b79047452507a
Reviewed-on: https://chromium-review.googlesource.com/401267
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/2435f867209df0c206e9b261e1147b1e0f7fece6/py/test/event.py
[modify] https://crrev.com/2435f867209df0c206e9b261e1147b1e0f7fece6/py/goofy/goofy.py

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 1 2016

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

commit f82b41ddd07740ebc673add465e4fac5d9b2522c
Author: Wei-Han Chen <stimim@google.com>
Date: Mon Oct 24 09:00:12 2016

goofy cleanup: remove show_review_information

show_review_information is not used anymore (tests statuses are always
shown in current web-based UI).

BUG=b:31678190, chromium:658151 
TEST=python goofy/goofy_unittest.py

Change-Id: I6dd79ff97d6b65e852b93fdbd6ca384f3dcdcbbb
Reviewed-on: https://chromium-review.googlesource.com/401268
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/f82b41ddd07740ebc673add465e4fac5d9b2522c/py/test/event.py
[modify] https://crrev.com/f82b41ddd07740ebc673add465e4fac5d9b2522c/py/goofy/goofy.py

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 7 2016

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

commit a3bca125249919a88e6b8547a03e9865c5d0a35b
Author: Earl Ou <shunhsingou@google.com>
Date: Fri Oct 21 08:00:30 2016

goofy: initial implementation of backend plugin

Currently goofy has a lot of platform dependent components. Some of the
components are written as functions in goofy, while others are separated
classes. To make it easier for user to decide what to use, we want to
create an unified interface for all platform dependent parts, that is,
goofy plugins. The core of goofy should only do test flow control.

This CL creates the basic implmentation of backend goofy plugin.
Moving of code in goofy to plugins will be uploaded in following CLs.

BUG= chromium:658151 
TEST=make test

Change-Id: Ib17e8fd62f14c5a5135c0bd5da91345cdb0e3118
Reviewed-on: https://chromium-review.googlesource.com/400322
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/test/factory.py
[add] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/plugins/goofy_unittest.json
[add] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/plugins/plugin_controller_unittest.py
[add] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/plugins/plugins.schema.json
[add] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/plugins/chromeos.json
[add] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/plugins/factory_common.py
[add] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/plugins/plugin_unittest.py
[modify] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/tools/deps.conf
[modify] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/goofy_unittest.py
[add] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/plugins/plugin_controller.py
[add] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/plugins/periodic_plugin.py
[add] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/plugins/plugin.py
[modify] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/goofy.py
[add] https://crrev.com/a3bca125249919a88e6b8547a03e9865c5d0a35b/py/goofy/plugins/__init__.py

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 7 2016

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

commit e3dcbd35f7a2e3e077fc5ef9b563d966012eebac
Author: Earl Ou <shunhsingou@google.com>
Date: Tue Oct 25 07:38:48 2016

goofy: create time_sanitizer goofy plugin

Goofy use time_sanitizer to make sure the consistency of system time.
Move related code into a Goofy plugin. Also move the original
implementation into py/tools.

CQ-DEPEND=CL:400322

BUG= chromium:658151 
TEST=1. make test
     2. verify time_sanitizer is running in amd64-generic-goofy

Change-Id: I256e18260b26f2d8e2da9e1c7a1cd95f51e4c5bc
Reviewed-on: https://chromium-review.googlesource.com/402948
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/e3dcbd35f7a2e3e077fc5ef9b563d966012eebac/py/goofy/goofy_rpc.py
[modify] https://crrev.com/e3dcbd35f7a2e3e077fc5ef9b563d966012eebac/py/goofy/plugins/chromeos.json
[rename] https://crrev.com/e3dcbd35f7a2e3e077fc5ef9b563d966012eebac/py/tools/time_sanitizer_unittest.py
[modify] https://crrev.com/e3dcbd35f7a2e3e077fc5ef9b563d966012eebac/py/test/factory.py
[modify] https://crrev.com/e3dcbd35f7a2e3e077fc5ef9b563d966012eebac/bin/time_sanitizer
[rename] https://crrev.com/e3dcbd35f7a2e3e077fc5ef9b563d966012eebac/py/tools/time_sanitizer.py
[modify] https://crrev.com/e3dcbd35f7a2e3e077fc5ef9b563d966012eebac/py/goofy/goofy.py
[add] https://crrev.com/e3dcbd35f7a2e3e077fc5ef9b563d966012eebac/py/goofy/plugins/time_sanitizer.py

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 7 2016

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

commit f808ee70aa088b76e895f0b4cd125ba90274416a
Author: Earl Ou <shunhsingou@google.com>
Date: Tue Oct 25 08:15:45 2016

goofy: create disk_monitor plugin

Currently Goofy logs disk space periodically and task required action
when the space is under or above a threshold.

Move related code into a separated goofy plugin.

CQ-DEPEND=CL:400322

BUG= chromium:658151 
TEST=make test
     verify disk related log when running Goofy

Change-Id: I2d6b62f370c94cd9d51e18b1188d7f2652fa2eac
Reviewed-on: https://chromium-review.googlesource.com/402949
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/f808ee70aa088b76e895f0b4cd125ba90274416a/py/test/test_lists/firmware_stress.py
[modify] https://crrev.com/f808ee70aa088b76e895f0b4cd125ba90274416a/py/goofy/plugins/chromeos.json
[modify] https://crrev.com/f808ee70aa088b76e895f0b4cd125ba90274416a/py/test/factory.py
[modify] https://crrev.com/f808ee70aa088b76e895f0b4cd125ba90274416a/py/test/test_lists/generic.py
[add] https://crrev.com/f808ee70aa088b76e895f0b4cd125ba90274416a/py/goofy/plugins/disk_monitor.py
[modify] https://crrev.com/f808ee70aa088b76e895f0b4cd125ba90274416a/py/test/test_lists/generic_rrt.py
[modify] https://crrev.com/f808ee70aa088b76e895f0b4cd125ba90274416a/py/goofy/goofy.py

Project Member

Comment 10 by bugdroid1@chromium.org, Nov 7 2016

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

commit 77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5
Author: Earl Ou <shunhsingou@google.com>
Date: Tue Oct 25 08:32:42 2016

goofy: move battery related logic into plugins

Currenly we control and monitor device battery in Goofy. Move those part
into BatteryMonitor and ChargeManager plugins.

CQ-DEPEND=CL:400322

BUG= chromium:658151 
TEST=make test; verify plugins are running in amd64-generic-goofy

Change-Id: I296cb2129fff5bdce89838ab586be215ea218af5
Reviewed-on: https://chromium-review.googlesource.com/402950
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/test/test_lists/generic_smt.py
[add] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/goofy/plugins/battery_monitor.py
[modify] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/test/test_lists/firmware_stress.py
[modify] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/test/test_lists/firmware_stress_generic.py
[modify] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/goofy/plugins/chromeos.json
[modify] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/test/factory.py
[modify] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/test/test_lists/generic_rrt.py
[modify] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/test/test_lists/generic.py
[modify] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/goofy/plugins/plugin.py
[modify] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/goofy/goofy.py
[modify] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/test/test_lists/generic_run_in.py
[add] https://crrev.com/77ed95f39f0f8f2e3f3d1e77ea9f1114778d59d5/py/goofy/plugins/charge_manager.py

Project Member

Comment 11 by bugdroid1@chromium.org, Nov 7 2016

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

commit e981f821cae0ca6f6de47ea268e8a5eec609382d
Author: Earl Ou <shunhsingou@google.com>
Date: Tue Oct 25 08:38:26 2016

goofy: move CPU related code into plugins

Currently Goofy logs and controls CPU freqency during the test running.
Move this part into plugins so we can enable or diable this based on
requirement.

CQ-DEPEND=CL:400322

BUG= chromium:658151 
TEST=make test

Change-Id: I9c19602a98f71775dfef0d576637dd5d4c410434
Reviewed-on: https://chromium-review.googlesource.com/402951
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[add] https://crrev.com/e981f821cae0ca6f6de47ea268e8a5eec609382d/py/goofy/plugins/cpu_freq_manager.py
[modify] https://crrev.com/e981f821cae0ca6f6de47ea268e8a5eec609382d/py/test/test_lists/generic_smt.py
[modify] https://crrev.com/e981f821cae0ca6f6de47ea268e8a5eec609382d/py/test/test_lists/firmware_stress.py
[modify] https://crrev.com/e981f821cae0ca6f6de47ea268e8a5eec609382d/py/goofy/plugins/chromeos.json
[add] https://crrev.com/e981f821cae0ca6f6de47ea268e8a5eec609382d/py/goofy/plugins/cpu_usage_monitor.py
[modify] https://crrev.com/e981f821cae0ca6f6de47ea268e8a5eec609382d/py/test/factory.py
[modify] https://crrev.com/e981f821cae0ca6f6de47ea268e8a5eec609382d/py/test/test_lists/generic_rrt.py
[modify] https://crrev.com/e981f821cae0ca6f6de47ea268e8a5eec609382d/py/goofy/plugins/plugin.py
[modify] https://crrev.com/e981f821cae0ca6f6de47ea268e8a5eec609382d/py/goofy/goofy.py

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 7 2016

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

commit a053e0794736eb047349490beacc584d6121463c
Author: Earl Ou <shunhsingou@google.com>
Date: Tue Oct 25 08:41:27 2016

goofy: move connection manager into a plugin

Goofy had a connection manager to keep device automatically connecting
to a list APs. Move related logic into a plugin so user of Goofy to
decide to enable / disable this function.

Also, since the code of connection manager is shared by Goofy and some
pytest, move it to cros.factory.test.utils instead of
cros.factory.goofy.

CQ-DEPEND=CL:400322

BUG= chromium:658151 
TEST=1. make test
     2. Manually verify connection_manager

Change-Id: If5df3607253f7a70181c4da6ca9ad63f6496ad5d
Reviewed-on: https://chromium-review.googlesource.com/402952
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[rename] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/utils/flimflam_test_path.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/goofy/goofy_unittest.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/test_lists/test_lists.py
[rename] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/utils/connection_manager_unittest.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/goofy/plugins/chromeos.json
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/pytests/vswr/vswr.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/test_lists/generic_fatp.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/pytests/lte_verify_config.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/factory.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/test_lists/generic_rrt.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/goofy/test_environment.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/test_lists/generic.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/pytests/rf_radiated/rf_radiated.py
[rename] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/test/utils/connection_manager.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/goofy/plugins/plugin.py
[modify] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/goofy/goofy.py
[add] https://crrev.com/a053e0794736eb047349490beacc584d6121463c/py/goofy/plugins/connection_manager.py

Project Member

Comment 13 by bugdroid1@chromium.org, Nov 7 2016

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

commit 9365ba2f23f4e804209ed2a3ad24fd43106f74b9
Author: Earl Ou <shunhsingou@google.com>
Date: Tue Oct 25 08:46:37 2016

goofy: move thermal watcher into plugin

Goofy logs device thermal information at a given time interval. Move
this logic to a plugin so user can choose to enable / disable this.

CQ-DEPEND=CL:400322

BUG= chromium:658151 
TEST=1. make test
     2. Manually verify thermal_monitor is running

Change-Id: I9a340279ab26d12e647a01cd20308c0ec07e07d1
Reviewed-on: https://chromium-review.googlesource.com/402953
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[add] https://crrev.com/9365ba2f23f4e804209ed2a3ad24fd43106f74b9/py/goofy/plugins/thermal_monitor.py
[modify] https://crrev.com/9365ba2f23f4e804209ed2a3ad24fd43106f74b9/py/goofy/goofy.py
[modify] https://crrev.com/9365ba2f23f4e804209ed2a3ad24fd43106f74b9/py/goofy/plugins/chromeos.json
[modify] https://crrev.com/9365ba2f23f4e804209ed2a3ad24fd43106f74b9/py/test/factory.py

Project Member

Comment 14 by bugdroid1@chromium.org, Nov 24 2016

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

commit ab979144a8158f9d222949faddcbab413d3f9402
Author: Earl Ou <shunhsingou@google.com>
Date: Tue Oct 25 08:48:06 2016

goofy: move system_log_manager and core_dump_manager into plugins

Goofy has two component to manage system logs on the device:
- system_log_manager: check and sync system log periodically to the
    shopfloor server.
- core_dump_manager: check core dump files and kick system_log_manager
    when required.
Move this two components into plugins.

Also, due to the scenario difference for RRT and firmware stressing
test, this CL also creates two different config fils for them.

CQ-DEPEND=CL:400322

BUG= chromium:658151 
TEST=1. goofy_unittest; system_log_manager_unittest
     2. Manually verify system_log_manager is running

Change-Id: Iad09e03003f80437c552e7dc1776fb6b1fe617ec
Reviewed-on: https://chromium-review.googlesource.com/402954
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[rename] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/goofy/plugins/system_log_manager.py
[rename] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/goofy/plugins/system_log_manager_unittest.py
[modify] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/goofy/plugins/battery_monitor.py
[modify] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/test/test_lists/firmware_stress.py
[modify] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/test/test_lists/generic.py
[add] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/goofy/plugins/core_dump_manager.py
[modify] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/goofy/plugins/chromeos.json
[modify] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/test/factory.py
[add] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/goofy/plugins/chromeos_rrt.json
[add] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/goofy/plugins/chromeos_firmware_stress.json
[modify] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/test/test_lists/generic_rrt.py
[modify] https://crrev.com/ab979144a8158f9d222949faddcbab413d3f9402/py/goofy/goofy.py

Project Member

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

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

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

Project Member

Comment 17 by bugdroid1@chromium.org, Mar 2 2017

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

commit 6d62ee30584ced6ce2dfb476ccc74efd082af44d
Author: Earl Ou <shunhsingou@google.com>
Date: Thu Mar 02 12:15:48 2017

json_utils: add MultiPathJSONRPCServer

Currently goofy handles all RPC call in one single instance, which is also
the 'state' instance that manages testing state information. So we see
many functions defined in either goofy_rpc or state that are not
actually related to testing state or goofy.

To help modularize goofy, it will be much clear to separate different
functions to different instances.

Multi-path RPC server can help seperate different RPC instances to
different URLs, so each URL can act like a sub RPC server.

However, currently in standard library only MultiPathXMLRPCServer is
supported. This CL mimics the implementation of MultiPathXMLRPCServer
for JSON version.

BUG= chromium:658151 
TEST=json_utils_unittest.py

Change-Id: I22385a5218594cab8704b24f49295b339f160fba
Reviewed-on: https://chromium-review.googlesource.com/445557
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/6d62ee30584ced6ce2dfb476ccc74efd082af44d/py/utils/jsonrpc_utils_unittest.py
[modify] https://crrev.com/6d62ee30584ced6ce2dfb476ccc74efd082af44d/py/utils/jsonrpc_utils.py

Project Member

Comment 18 by bugdroid1@chromium.org, Mar 2 2017

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

commit 159b9f2cfd9f119a49fef18a7e18d67f21c9ff7a
Author: Earl Ou <shunhsingou@google.com>
Date: Thu Mar 02 12:15:48 2017

state: move non storage related function to goofy_rpc

There are many functions in state.py that is not really related to state
storage. Move those functions to goofy_rpc.

BUG= chromium:658151 
TEST=make test

Change-Id: Ib5907b8e5412c6a9a14dd27e614fc9a165a06537
Reviewed-on: https://chromium-review.googlesource.com/446182
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/159b9f2cfd9f119a49fef18a7e18d67f21c9ff7a/py/goofy/goofy_rpc.py
[modify] https://crrev.com/159b9f2cfd9f119a49fef18a7e18d67f21c9ff7a/py/goofy/goofy_rpc_unittest.py
[modify] https://crrev.com/159b9f2cfd9f119a49fef18a7e18d67f21c9ff7a/py/goofy/js/goofy.js
[modify] https://crrev.com/159b9f2cfd9f119a49fef18a7e18d67f21c9ff7a/py/test/state.py

Project Member

Comment 19 by bugdroid1@chromium.org, Mar 2 2017

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

commit acbe99ca1f410e5677887c6a431d3fc9862704f0
Author: Earl Ou <shunhsingou@google.com>
Date: Thu Mar 02 12:15:48 2017

goofy: implement goofy_server

Currently cros.factory.test.state is not only a state data storage, but
also a complicated server that:
   1. Serves static files for Goofy UI.
   2. Handles RPC for Goofy.
   3. Partially handles test list status.

To achieve this, we see code that inject goofy_rpc functions into state
instance to get RPC support, which is not really intuitive.

As we'd like to support RPC for Goofy plugins, state server will be too
complicated and hard to maintain.

In this CL, we implement a goofy_server that is designed to handle above
memtioned web request, including serving static files for UI and
handling multiple RPC instances.

The goal is to make the responsibility of each components more clear:
  - state: handles shared data.
  - goofy/goofy_rpc: organizes the system and handles test status.
  - goofy_server: handles all web requests.
  - goofy plugins: additional functions for goofy.

BUG= chromium:658151 
TEST=make test
     run amd64-generic-goofy toolkit.

Change-Id: Ie5b50fef113114542f3574e75a625046f99d5063
Reviewed-on: https://chromium-review.googlesource.com/446142
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/acbe99ca1f410e5677887c6a431d3fc9862704f0/py/goofy/goofy_unittest.py
[modify] https://crrev.com/acbe99ca1f410e5677887c6a431d3fc9862704f0/py/test/test_ui.py
[modify] https://crrev.com/acbe99ca1f410e5677887c6a431d3fc9862704f0/py/utils/sync_utils_unittest.py
[delete] https://crrev.com/6d62ee30584ced6ce2dfb476ccc74efd082af44d/py/test/state_unittest.py
[modify] https://crrev.com/acbe99ca1f410e5677887c6a431d3fc9862704f0/py/test/state.py
[add] https://crrev.com/acbe99ca1f410e5677887c6a431d3fc9862704f0/py/test/env/goofy_proxy.py
[add] https://crrev.com/acbe99ca1f410e5677887c6a431d3fc9862704f0/py/goofy/goofy_server.py
[modify] https://crrev.com/acbe99ca1f410e5677887c6a431d3fc9862704f0/py/utils/sync_utils.py
[modify] https://crrev.com/acbe99ca1f410e5677887c6a431d3fc9862704f0/py/goofy/goofy.py
[add] https://crrev.com/acbe99ca1f410e5677887c6a431d3fc9862704f0/py/goofy/goofy_server_unittest.py
[modify] https://crrev.com/acbe99ca1f410e5677887c6a431d3fc9862704f0/py/goofy/js/goofy.js

Project Member

Comment 20 by bugdroid1@chromium.org, Mar 3 2017

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

commit 17f6fb7116b1d5ba31af442e54e0a05bd68693bb
Author: Peter Shih <pihsun@chromium.org>
Date: Fri Mar 03 11:14:51 2017

test_ui: Fix register_path still using old state.py

Some RPC methods are moved to goofy_server after CL:446142, and need
to change the calling site too.

BUG= chromium:658151 
TEST=make test
TEST=manually, build a toolkit and run pytest with static html.

Change-Id: Ifcca1d6e2d0d13805b8e3dc5cb17f70fcc89ab18
Reviewed-on: https://chromium-review.googlesource.com/449513
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/17f6fb7116b1d5ba31af442e54e0a05bd68693bb/py/test/test_ui.py

Project Member

Comment 21 by bugdroid1@chromium.org, Mar 14 2017

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

commit f76e55c055089d79913443060abe7b6f44e0bc15
Author: Earl Ou <shunhsingou@google.com>
Date: Tue Mar 14 05:40:05 2017

goofy: move rebooting logging stuff to device API

Goofy tries to log system information when there is unexpected shutdown
during test. |shutdown| pytest also uses GoofyRPC to logging those
information. Those parts are actually device specific and not portable.

Move those implementation to device API. The next step is to move those
function out of GoofyRPC to Goofy plugins.

BUG= chromium:658151 
TEST=make test

Change-Id: Id02c3eaa1ff19d163350e92cb33de0857877777f
Reviewed-on: https://chromium-review.googlesource.com/451078
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/f76e55c055089d79913443060abe7b6f44e0bc15/py/goofy/goofy_rpc.py
[modify] https://crrev.com/f76e55c055089d79913443060abe7b6f44e0bc15/py/test/pytests/shutdown/shutdown.py
[modify] https://crrev.com/f76e55c055089d79913443060abe7b6f44e0bc15/py/utils/sys_utils_unittest.py
[modify] https://crrev.com/f76e55c055089d79913443060abe7b6f44e0bc15/py/device/hooks.py
[modify] https://crrev.com/f76e55c055089d79913443060abe7b6f44e0bc15/py/goofy/goofy.py
[modify] https://crrev.com/f76e55c055089d79913443060abe7b6f44e0bc15/py/goofy/goofy_rpc_unittest.py
[modify] https://crrev.com/f76e55c055089d79913443060abe7b6f44e0bc15/py/utils/sys_utils.py

I'd like to set an additional goal on this. To support "using goofy to do station-base testing", we do want a setup that
 - runs on top of any Linux box, not ChromeOS
 - runs goofy properly

It seems to me that an ideal solution is to make Goofy runs on top of one Docker image, for example ubuntu or debien, with all dependencies we need, so we can tell partner to just setup a Linux box, get Docker, deploy with our scripts to get device toolkit installed & updated.
Project Member

Comment 23 by bugdroid1@chromium.org, May 2 2017

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

commit 5b619cc8ea14b5d0d299894c1fe0a30ec073d8e2
Author: Earl Ou <shunhsingou@google.com>
Date: Tue May 02 14:31:31 2017

plugin: add support for plugin RPC interface

Plugins can now register their own public RPC functions to Goofy server,
allowing goofy web frontend, tests, or other plugins to communicate with each
other.

BUG= chromium:658151 
TEST=make test

Change-Id: I90591f5024ce940adfb85acc7da0b794796bbd6a
Reviewed-on: https://chromium-review.googlesource.com/462738
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/5b619cc8ea14b5d0d299894c1fe0a30ec073d8e2/py/goofy/plugins/plugin.py
[modify] https://crrev.com/5b619cc8ea14b5d0d299894c1fe0a30ec073d8e2/py/goofy/goofy.py
[modify] https://crrev.com/5b619cc8ea14b5d0d299894c1fe0a30ec073d8e2/py/goofy/plugins/plugin_controller.py
[modify] https://crrev.com/5b619cc8ea14b5d0d299894c1fe0a30ec073d8e2/py/goofy/plugins/plugin_controller_unittest.py

Project Member

Comment 24 by bugdroid1@chromium.org, May 9 2017

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

commit 2482140a048159202eec7e4042f1da0c38bbddf3
Author: Earl Ou <shunhsingou@google.com>
Date: Tue May 09 18:29:16 2017

goofy plugins: add Overrides annotation

Add Overrides annotation to avoid typo.

BUG= chromium:658151 
TEST=make test

Change-Id: Ie94941435b14d3a3078d3391560f295325ea515c
Reviewed-on: https://chromium-review.googlesource.com/499968
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/cpu_freq_manager.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/connection_manager.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/battery_monitor.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/thermal_monitor.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/core_dump_manager.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/instalog.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/cpu_usage_monitor.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/system_log_manager.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/periodic_plugin.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/disk_monitor.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/charge_manager.py
[modify] https://crrev.com/2482140a048159202eec7e4042f1da0c38bbddf3/py/goofy/plugins/time_sanitizer.py

Project Member

Comment 25 by bugdroid1@chromium.org, May 9 2017

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

commit d14db2a024e355ac2a4aa517e5e9baa270511439
Author: Earl Ou <shunhsingou@google.com>
Date: Tue May 09 21:58:31 2017

goofy plugin: use decorator to define RPC function

Previous implementation of plugin RPC needs a self defined RPC
instance. To make it easier for plugin writer, we change the API design to
use decorator.

BUG= chromium:658151 
TEST=make test

Change-Id: I29a4b16d53aab6997d3126b96ca1dbb695bfb2ea
Reviewed-on: https://chromium-review.googlesource.com/499969
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/d14db2a024e355ac2a4aa517e5e9baa270511439/py/goofy/plugins/plugin.py
[modify] https://crrev.com/d14db2a024e355ac2a4aa517e5e9baa270511439/py/goofy/plugins/plugin_unittest.py

Project Member

Comment 26 by bugdroid1@chromium.org, May 16 2017

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

commit c428cc8a3bf7eac0cb30838678b449df203202d4
Author: Earl Ou <shunhsingou@google.com>
Date: Tue May 16 17:41:46 2017

goofy_rpc: move plugin related call to plugin RPC

Now we have standard way for goofy plugins to register their own RPC
functions. Remove those functions from goofy_rpc.py to make it clear.

BUG= chromium:658151 
TEST=make test

Change-Id: Iba4f3c5332d1bea88ae45de5b48b326300ce5a6a
Reviewed-on: https://chromium-review.googlesource.com/462739
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/c428cc8a3bf7eac0cb30838678b449df203202d4/py/goofy/goofy_rpc.py
[modify] https://crrev.com/c428cc8a3bf7eac0cb30838678b449df203202d4/py/test/pytests/network_setup/network_setup.py
[modify] https://crrev.com/c428cc8a3bf7eac0cb30838678b449df203202d4/py/test/pytests/sync_shopfloor.py
[modify] https://crrev.com/c428cc8a3bf7eac0cb30838678b449df203202d4/py/test/utils/time_utils.py
[modify] https://crrev.com/c428cc8a3bf7eac0cb30838678b449df203202d4/py/test/utils/connection_manager.py
[modify] https://crrev.com/c428cc8a3bf7eac0cb30838678b449df203202d4/py/goofy/plugins/connection_manager.py
[modify] https://crrev.com/c428cc8a3bf7eac0cb30838678b449df203202d4/py/goofy/plugins/time_sanitizer.py
[modify] https://crrev.com/c428cc8a3bf7eac0cb30838678b449df203202d4/py/test/pytests/audio_quality.py

Project Member

Comment 27 by bugdroid1@chromium.org, May 18 2017

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

commit e43246e2c4fb2bedde482eca2e23e6631d373811
Author: Earl Ou <shunhsingou@google.com>
Date: Thu May 18 09:26:10 2017

goofy plugin: implement API for adding menu items

There are many menu items in Goofy frontend that perform operations on
DUT and rely on the implementation of goofy_rpc.py. This makes
goofy_rpc.py too big to maintain.

To make Goofy portable, we creates API to allow plugins to add their own
menu items, so that we can move all those functions out of goofy_rpc
into seperated plugins.

BUG= chromium:658151 
TEST=make test

Change-Id: Ica120fa031a3c7d2f26c36224d672963cfb848c5
Reviewed-on: https://chromium-review.googlesource.com/498373
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/e43246e2c4fb2bedde482eca2e23e6631d373811/py/goofy/goofy_rpc.py
[modify] https://crrev.com/e43246e2c4fb2bedde482eca2e23e6631d373811/py/goofy/plugins/plugin_controller_unittest.py
[modify] https://crrev.com/e43246e2c4fb2bedde482eca2e23e6631d373811/py/goofy/plugins/plugin_unittest.py
[modify] https://crrev.com/e43246e2c4fb2bedde482eca2e23e6631d373811/py/goofy/plugins/plugin_controller.py
[modify] https://crrev.com/e43246e2c4fb2bedde482eca2e23e6631d373811/py/goofy/plugins/plugin.py
[modify] https://crrev.com/e43246e2c4fb2bedde482eca2e23e6631d373811/py/goofy/js/goofy.js

Project Member

Comment 28 by bugdroid1@chromium.org, May 18 2017

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

commit 334b5b4617a0a2387842a1d6d8bf11886dcd4f96
Author: Earl Ou <shunhsingou@google.com>
Date: Thu May 18 13:03:48 2017

goofy.js: add function to access plugin RPC

BUG= chromium:658151 
TEST=manual

Change-Id: I27041d3f2aceab4af7c5ff777fa0f0e1a81e0070
Reviewed-on: https://chromium-review.googlesource.com/500010
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/334b5b4617a0a2387842a1d6d8bf11886dcd4f96/py/goofy/js/goofy.js

Project Member

Comment 29 by bugdroid1@chromium.org, May 18 2017

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

commit f349c059162c2ef6bef92dcced97188beb39465b
Author: Earl Ou <shunhsingou@google.com>
Date: Thu May 18 13:03:48 2017

device_manager: move backend code into goofy plugin

There are plently of code in goofy_rpc.py that are related to DUT
information. Move related code into new plugin DeviceManager.

The JS code device_manager.js is still kept in goofy/js until we find
better way to include and compile complicated plugin JS.

BUG= chromium:658151 
TEST=make test

Change-Id: I3c1764db4bccd6487b53730c805919104b7285d0
Reviewed-on: https://chromium-review.googlesource.com/500011
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/f349c059162c2ef6bef92dcced97188beb39465b/py/goofy/goofy_rpc.py
[modify] https://crrev.com/f349c059162c2ef6bef92dcced97188beb39465b/py/goofy/plugins/goofy_plugin_chromeos.json
[add] https://crrev.com/f349c059162c2ef6bef92dcced97188beb39465b/py/goofy/plugins/device_manager.py
[modify] https://crrev.com/f349c059162c2ef6bef92dcced97188beb39465b/po/zh-CN.po
[modify] https://crrev.com/f349c059162c2ef6bef92dcced97188beb39465b/py/goofy/js/device_manager.js
[add] https://crrev.com/f349c059162c2ef6bef92dcced97188beb39465b/py/goofy/plugins/device_manager_unittest.py
[modify] https://crrev.com/f349c059162c2ef6bef92dcced97188beb39465b/py/goofy/goofy_rpc_unittest.py
[modify] https://crrev.com/f349c059162c2ef6bef92dcced97188beb39465b/py/goofy/js/goofy.js

Project Member

Comment 30 by bugdroid1@chromium.org, May 18 2017

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

commit 487301eabb1fa2275c0a437b11d527ff45a04aa1
Author: Earl Ou <shunhsingou@google.com>
Date: Thu May 18 13:03:49 2017

goofy: move find_kcrash to system_log_manager

Goofy used to search kcrash during initialization. This should belong to
a goofy plugin instead of goofy itself. Move related logic to
system_log_manager.

BUG= chromium:658151 
TEST=make test

Change-Id: I4c1d3d733cfa7a4fb145f14bb6513ef4af3778a1
Reviewed-on: https://chromium-review.googlesource.com/501748
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/487301eabb1fa2275c0a437b11d527ff45a04aa1/py/goofy/goofy.py
[modify] https://crrev.com/487301eabb1fa2275c0a437b11d527ff45a04aa1/py/goofy/plugins/system_log_manager.py
[modify] https://crrev.com/487301eabb1fa2275c0a437b11d527ff45a04aa1/py/goofy/plugins/system_log_manager_unittest.py

Project Member

Comment 31 by bugdroid1@chromium.org, May 18 2017

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

commit 8995d5e60c5887e6e39c61456f756133e485458f
Author: Earl Ou <shunhsingou@google.com>
Date: Thu May 18 13:03:49 2017

goofy: implement plugin UI API

Implement API for plugin to provide its own UI static files.

To provide static files, plugin should have its own subdirectory, and
put all the static files under <plugin_dir>/static.

Once loaded, Goofy server maps URL /plugin/<plugin_name> to
<plugin_dir>/static, with '.' replaced by '_' in plugin name.

The plugin UI is shown in an <iframe> at the bottom-left corner of the
Goofy Web UI

To provide frontend UI, simply return `True` in function `HasUI`.

For example,

    class MyPlugin(plugin.Plugin):

      @type_utils.Overrides
      def HasUI(self):
        return True

Plugin can have its own JavaScript file. During the plugin <iframe> creation,
the namespace `cros` and `goog` is set by Goofy. Therefore, plugin Javascript
can also access a set of useful tools defined in `cros` and `goog`. A `plugin`
object that provide a set of useful functions are also injected.

This CL also change the config field by remove 'backend' and
'frontend', and unify 'plugin name' to be the module name after
`cros.factory.goofy.plugins` and without the class name.

BUG= chromium:658151 
TEST=make test

Change-Id: Ic78822180794495fd3bba872e4a2873fb3d4f6e7
Reviewed-on: https://chromium-review.googlesource.com/505837
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/po/Makefile
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/goofy_plugin_chromeos_rrt.json
[add] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/mock_plugin/__init__.py
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/plugins.schema.json
[add] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/mock_plugin/static/FOR_UNITTEST
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/static/Makefile
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/js/goofy.js
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/js/device_manager.js
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/static/css/goofy.css
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/goofy.py
[add] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/js/plugin.js
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/goofy_plugin_chromeos.json
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/plugin_unittest.py
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/static/index.html
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/goofy_rpc.py
[add] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/mock_plugin/mock_plugin.py
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/goofy_plugin_station.json
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/plugin_controller_unittest.py
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/goofy_plugin_goofy_unittest.json
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/goofy_plugin_chromeos_firmware_stress.json
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/plugin_controller.py
[modify] https://crrev.com/8995d5e60c5887e6e39c61456f756133e485458f/py/goofy/plugins/plugin.py

Project Member

Comment 32 by bugdroid1@chromium.org, May 19 2017

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

commit d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0
Author: Earl Ou <shunhsingou@google.com>
Date: Fri May 19 01:08:01 2017

goofy: create status_monitor plugin.

Create and move status info related code into Goofy plugin.

BUG= chromium:658151 
TEST=make test

Change-Id: Ib02691f51cd1efcd76b6ba08be6329fa61b413e5
Reviewed-on: https://chromium-review.googlesource.com/505838
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[add] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/status_monitor.css
[modify] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/goofy_rpc.py
[rename] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/images/wlan_off.png
[modify] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/goofy_plugin_chromeos.json
[rename] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/images/info.png
[rename] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/images/battery.png
[modify] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/po/zh-CN.po
[add] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/status_monitor.html
[rename] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/images/wlan_on.png
[add] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/status_monitor.py
[rename] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/images/chip.png
[modify] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/static/css/goofy.css
[rename] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/images/eth_on.png
[add] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/factory_common.py
[rename] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/images/eth_off.png
[rename] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/images/thermometer.png
[add] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/static/status_monitor.js
[add] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/plugins/status_monitor/__init__.py
[modify] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/goofy_rpc_unittest.py
[modify] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/static/index.html
[modify] https://crrev.com/d8f8125ecb41772bead3cbeb895e2fa98a4ff3f0/py/goofy/js/goofy.js

Project Member

Comment 33 by bugdroid1@chromium.org, May 20 2017

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

commit cc6b3c150c8463026dbfb0124b4a85a360cf9a8e
Author: Earl Ou <shunhsingou@google.com>
Date: Sat May 20 06:40:35 2017

goofy plugin: add readme.

BUG= chromium:658151 
TEST=make test

Change-Id: I3ef84f63808fcba96490b4dceb4e1a59c0f1e1c0
Reviewed-on: https://chromium-review.googlesource.com/505793
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[add] https://crrev.com/cc6b3c150c8463026dbfb0124b4a85a360cf9a8e/py/goofy/plugins/README.md

Project Member

Comment 34 by bugdroid1@chromium.org, May 20 2017

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

commit cc6b3c150c8463026dbfb0124b4a85a360cf9a8e
Author: Earl Ou <shunhsingou@google.com>
Date: Sat May 20 06:40:35 2017

goofy plugin: add readme.

BUG= chromium:658151 
TEST=make test

Change-Id: I3ef84f63808fcba96490b4dceb4e1a59c0f1e1c0
Reviewed-on: https://chromium-review.googlesource.com/505793
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[add] https://crrev.com/cc6b3c150c8463026dbfb0124b4a85a360cf9a8e/py/goofy/plugins/README.md

Project Member

Comment 37 by bugdroid1@chromium.org, May 20 2017

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

commit 60a3c7992bcc5425c69175836c180832369631ad
Author: Earl Ou <shunhsingou@google.com>
Date: Sat May 20 08:45:54 2017

testlog: read runtime directory from env variable

In test/env/paths.py, runtime directory path can be overrided by
environment variable. Modify testlog so the same variable is read.

BUG= chromium:658151 
TEST=make test

Change-Id: If5cb8351338a533cf22ed621580ec054bf9b71bd
Reviewed-on: https://chromium-review.googlesource.com/509473
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/60a3c7992bcc5425c69175836c180832369631ad/py/test/testlog.py

Project Member

Comment 38 by bugdroid1@chromium.org, May 22 2017

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

commit 6de96c0944de2acb2683e2da631b247ed5144bf1
Author: Earl Ou <shunhsingou@google.com>
Date: Mon May 22 12:02:45 2017

Fix dependency issues for running Goofy on non Chrome device

This CL tries to fix library dependency issues for:
- syslog
- setproctitle
by moving them into external.

And fix issues for ctypes and pexpect by avoiding using them when not
necessary.

BUG= chromium:658151 
TEST=make test

Change-Id: Iea5bab795637e11a139feb0249bf2e6c74380f50
Reviewed-on: https://chromium-review.googlesource.com/509475
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[add] https://crrev.com/6de96c0944de2acb2683e2da631b247ed5144bf1/py/external/syslog.py
[modify] https://crrev.com/6de96c0944de2acb2683e2da631b247ed5144bf1/py/goofy/invocation.py
[modify] https://crrev.com/6de96c0944de2acb2683e2da631b247ed5144bf1/py/goofy/goofy_presenter.py
[add] https://crrev.com/6de96c0944de2acb2683e2da631b247ed5144bf1/py/external/_dummy/syslog.py
[add] https://crrev.com/6de96c0944de2acb2683e2da631b247ed5144bf1/py/external/_dummy/setproctitle.py
[modify] https://crrev.com/6de96c0944de2acb2683e2da631b247ed5144bf1/py/utils/sync_utils.py
[modify] https://crrev.com/6de96c0944de2acb2683e2da631b247ed5144bf1/py/test/network.py
[modify] https://crrev.com/6de96c0944de2acb2683e2da631b247ed5144bf1/py/goofy/goofy.py
[add] https://crrev.com/6de96c0944de2acb2683e2da631b247ed5144bf1/py/external/setproctitle.py

Project Member

Comment 39 by bugdroid1@chromium.org, May 22 2017

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

commit 2b1ec3c6170be2bd106e248832781dd287d68100
Author: Earl Ou <shunhsingou@google.com>
Date: Mon May 22 12:02:45 2017

Fix ResetCommitTime on non Chrome device

For some device, e.g. Android, there is not /etc/mtab. Check
/proc/mounts instead of /etc/mtab in ResetCommitTime.

BUG= chromium:658151 
TEST=make test

Change-Id: I76913eeb12a1dc2d27530eb1fb61b3360f82d8c4
Reviewed-on: https://chromium-review.googlesource.com/509476
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/2b1ec3c6170be2bd106e248832781dd287d68100/py/utils/sys_utils.py

Project Member

Comment 40 by bugdroid1@chromium.org, May 23 2017

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

commit feb6be5a83b74a58ac9a25f1ae1765152d64ce91
Author: Chih-Yu Huang <akahuang@google.com>
Date: Tue May 23 10:31:53 2017

Status: Verified (was: Started)

Sign in to add a comment