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

Issue 763594 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

factory: A docker image that can run factory toolkit for station mode tests.

Project Member Reported by hungte@chromium.org, Sep 9 2017

Issue description

I think we need a way to build a simple docker image that can create a factory toolkit runs inside docker, primarily targeted for testing in station mode.

This is very helpful for projects doing station tests so they don't need to use Chromebooks, especially FAI or Android projects.
 

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

Owner: petershih@chromium.org
Status: Assigned (was: Untriaged)
assign to shen-en, I wonder if you'll probably need to do this for your new device project.
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 30 2018

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

commit ed115c9197de49a4d64c29dacd300e3687e6eb58
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Mar 30 13:36:14 2018

setup: Add new 'make_docker_image.sh' tool.

As the first step of running factory toolkit inside docker, we need a
quick and easy way to create docker images from existing Chromium OS
test images.

BUG=chromium:763594
TEST=./make_docker_image.sh chromiumos_test_image.bin

Change-Id: I34bea477167fd59033f681a21a3f1d86c4272e80
Reviewed-on: https://chromium-review.googlesource.com/984572
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[add] https://crrev.com/ed115c9197de49a4d64c29dacd300e3687e6eb58/setup/make_docker_image.sh

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 3 2018

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

commit 057c5c872e00114560cc314e71e6997fcfa9c85e
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Apr 03 05:42:43 2018

utils: Add debug_utils.DummyInterface to simplify creating dummy implementation.

It is very often that we will want dummy implementations for particular
environment, for example Docker or chroot. The new DummyInterface adds a
quick way to switch underlying implementations.

A wrapper function GetInterface is also provided. Also removed the
outdated Dummy* implementations (which were all not used today).

BUG=chromium:763594
TEST=make test

Change-Id: Iad8a0241946e7e756c595e7bc19de23ffcf2ec80
Reviewed-on: https://chromium-review.googlesource.com/986115
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/057c5c872e00114560cc314e71e6997fcfa9c85e/py/utils/debug_utils.py
[modify] https://crrev.com/057c5c872e00114560cc314e71e6997fcfa9c85e/py/test/utils/dhcp_utils.py
[modify] https://crrev.com/057c5c872e00114560cc314e71e6997fcfa9c85e/py/test/utils/connection_manager.py

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 3 2018

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

commit 72cf7b74def830ae4352eff45cbe9cbe491ebb98
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Apr 03 10:44:12 2018

setup: Support Goofy in Docker (goofy_docker, cros_docker goofy).

Minimal changes to enable running Goofy inside Docker.

This change adds a new command 'goofy' to cros_docker.sh. You need to
first build a Docker image from Chromium OS test image (using
make_docker_image.sh), then either run Goofy from source tree or a
factory toolkit installer.

If you run 'cros_docker.sh goofy try', Goofy will run from your source
tree directly. If you use 'cros_docker.sh goofy shell', then it's an
empty space for you to install a complete toolkit.

BUG=chromium:763594
TEST=./cros_docker.sh goofy try
     ./cros_docker.sh goofy try eve_test
     ./cros_docker.sh goofy shell
     docker# /usr/local/factory/bin/goofy_docker

Change-Id: I5bb9ce967f4b03f8dc74ea20aed05707017a08d0
Reviewed-on: https://chromium-review.googlesource.com/984752
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/72cf7b74def830ae4352eff45cbe9cbe491ebb98/setup/cros_docker.sh
[add] https://crrev.com/72cf7b74def830ae4352eff45cbe9cbe491ebb98/sh/goofy_docker.sh
[add] https://crrev.com/72cf7b74def830ae4352eff45cbe9cbe491ebb98/bin/goofy_docker

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 3 2018

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

commit bad731207e25e0492116c2a319d39417a5873896
Author: Hung-Te Lin <hungte@chromium.org>
Date: Tue Apr 03 10:44:11 2018

goofy: Allow disabling plugins in default config.

For special environments like Docker, we may want to always disable few
plugins but not changing the whole plugin config file defined in test
list.

With the new default 'goofy_plugins.json', we can now override some
options config in py/config or /var/factory/config - especially to
disable particular plugins.

For example, adding a '{"plugins":{"cpu_freq_manager":{"enabled":false}}}'
to /var/factory/config/goofy_plugins.json will prevent any goofy plugin
configs from loading cpu_freq_manager plugin, unless if they explicitly
specified "enabled" as true.

BUG=chromium:763594
TEST=make test

Change-Id: I2ef90a3ba7f7f31286b850cc40876fcf17859ffd
Reviewed-on: https://chromium-review.googlesource.com/986116
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/bad731207e25e0492116c2a319d39417a5873896/py/goofy/plugins/plugin_controller.py
[add] https://crrev.com/bad731207e25e0492116c2a319d39417a5873896/py/goofy/plugins/goofy_plugins.json
[modify] https://crrev.com/bad731207e25e0492116c2a319d39417a5873896/py/goofy/plugins/plugins.schema.json

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 9 2018

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

commit 01a13a1a58e7790a0bdf2e9f5c58b2f8b2d00e7c
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Apr 09 11:00:11 2018

test: Stop checking if lower-case 'ACTIVE' file exists.

On platforms that file names are not case-sensitive, for example Mac,
checking 'active' file will always return True while the file was
actually created as 'ACTIVE'.

Since the 'active' (old format) has been deprecated for a really very
long time that no projects should be creating that file, it should be
safe to simply remove the check.

BUG=chromium:763594
TEST=make test

Change-Id: I3a944d9809decb2df20164703a8a1394dbe94903
Reviewed-on: https://chromium-review.googlesource.com/1002222
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/01a13a1a58e7790a0bdf2e9f5c58b2f8b2d00e7c/py/test/test_lists/manager.py

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 9 2018

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

commit 1be934e3bf620beeec19fd75b14af1ba7d067f8c
Author: Hung-Te Lin <hungte@chromium.org>
Date: Mon Apr 09 11:00:13 2018

goofy: Eliminate error message when /sys VPD is not available.

The /sys/firmware/vpd is only available on recent Chromebooks, and is
not important in Goofy start process so we should simply ignore it, and
no need to print the stack trace of exception.

BUG=chromium:763594
TEST=make test

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

[modify] https://crrev.com/1be934e3bf620beeec19fd75b14af1ba7d067f8c/py/goofy/goofy.py

Comment 8 by hungte@chromium.org, Apr 16 2018

Owner: ----
Status: Untriaged (was: Assigned)
Docker part is done, but we may still need someone to polish the toolkit side.
I have a draft design doc on this: go/factory-toolkit-in-docker. But this was before the ChromeOS docker image is available.

As we have a working docker image now, it makes things much more easier than before.
Owner: yhong@chromium.org
Status: Started (was: Untriaged)
yhong is interested on this. reassign to him.

Sign in to add a comment