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

Issue 770601 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

factory: Clean up goofy's 'env' and 'ui' options

Project Member Reported by petershih@chromium.org, Oct 2 2017

Issue description

I'd like to do some clean up on goofy's 'env' and 'ui' options.

There are two 'ui' options supported right now:
1. 'chrome'
   --> If a pytest needs a UI interaction, it should wait until a Chrome browser opened, and a web socket is connected.
2. 'none'
   --> For headless devices.
   --> If a pytest needs a UI interaction, it keeps going without waiting UI.


And, there are also two supported 'env' options for now:
1. DUTEnvironment
   --> Runs goofy on a DUT
2. FakeChrootEnvironment
   --> Runs goofy within a chroot
   --> Seems deprecated after dropping support for autotest?
   --> Plan to remove this, any concern?


After we dropped support for Goofy presenter mode (in chromium:767083), I think we're planning to use station-based tests on headless devices. Do we still need to run goofy on a headless device?

If we will not run goofy on headless devices, I'd like to drop the support for option '--ui=none' to do some clean up.
 
Cc: stimim@chromium.org chromeos-factory-eng@google.com
> I think we're planning to use station-based tests on headless devices. Do we still need to run goofy on a headless device?

We do want to run station-based tests for "most" headless devices (Some devices that are expected to have monitor when using, for example Chromebox, will not do station-based tests).
However, we may still need to use modular goofy for running offline run-in tests.

> If we will not run goofy on headless devices, I'd like to drop the support for option '--ui=none' to do some clean up.

We may still need this for run-in tests, but you can do some refactoring for example making it an option instead of different UI.

>  FakeChrootEnvironment

No special concern to remove it, but I wonder if it's used by unittest?

Thanks for the clarification.

To make it more clear, for the run-in tests without UI, goofy should still support option 'no_host=True' on tests, as suggested in https://chromium-review.googlesource.com/c/chromiumos/platform/factory/+/237690.

So, even for the run-in tests on headless devices, goofy is still started with arg '--ui=chrome'. So nothing is changed here, even if we deprecate '--ui=none'.


I'm planning to do following refactors:

1. Remove support of '--ui=none' option
This is currently only used in unittest. Switch to use GoofyUITest will make unittest work again.

2. Deprecate '--ui' option
After dropping support of '--ui=none', the only support UI is Chrome. We can add it back if we plan to support different UI in the future.

3. Remove FakeChrootEnvironment
Not used anywhere, neither in unittest.
sgtm
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 2 2017

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

commit e05cbbc65025ca6bfa5b8086e4c6906e819756b6
Author: Shen-En Shih <petershih@chromium.org>
Date: Mon Oct 02 15:19:08 2017

goofy: Remove FakeChrootEnvironment

Not used anymore.

BUG= chromium:770601 
TEST=make test

Change-Id: I875b6fa3803c803f8966c7fcfd32029da27901fa
Reviewed-on: https://chromium-review.googlesource.com/694725
Commit-Ready: Shen-En Shih <petershih@chromium.org>
Tested-by: Shen-En Shih <petershih@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/e05cbbc65025ca6bfa5b8086e4c6906e819756b6/py/goofy/goofy.py
[modify] https://crrev.com/e05cbbc65025ca6bfa5b8086e4c6906e819756b6/py/goofy/test_environment.py

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 2 2017

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

commit 65619f45778aaf1d937ac4f389539e32c5565e80
Author: Shen-En Shih <petershih@chromium.org>
Date: Mon Oct 02 15:19:08 2017

goofy: Deprecate '--ui' option

The '--ui' option supports several settings:
1. 'none'
   No UI for goofy. Only used for unittest.
2. 'chrome'
   This is the default.
3. 'gtk'
   Deprecated.

This '--ui' option is now removed in this CL. Unittests now use
GoofyUITest to establish a web socket after goofy is initialized.

BUG= chromium:770601 
TEST=make test

Change-Id: Ic3767afc61e728015ea47398ef14d3c42b02ba2a
Reviewed-on: https://chromium-review.googlesource.com/694726
Commit-Ready: Shen-En Shih <petershih@chromium.org>
Tested-by: Shen-En Shih <petershih@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/65619f45778aaf1d937ac4f389539e32c5565e80/py/goofy/goofy.py
[modify] https://crrev.com/65619f45778aaf1d937ac4f389539e32c5565e80/py/goofy/goofy_unittest.py

Status: Fixed (was: Untriaged)

Sign in to add a comment