New issue
Advanced search Search tips

Issue 775932 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature

Blocking:
issue 776023



Sign in to add a comment

ImageTest: allow running individual tests

Project Member Reported by jorgelo@chromium.org, Oct 18 2017

Issue description

When developing new tests for ImageTest, it's kind of annoying to have to run the entire test suite while iterating on code, since it takes about a minute to complete. The test_image cmdline doesn't seem to allow selecting individual tests, so let's add that. Especially if we're going to make other people modify this test when they add or change some users.
 
Blocking: 776023

Comment 2 by vapier@chromium.org, Oct 18 2017

Owner: vapier@chromium.org
this could use some merging with our existing test frameworks to get such functionality for free
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/3e04661dba1a09512ab38867377a4c63741b65d0

commit 3e04661dba1a09512ab38867377a4c63741b65d0
Author: Mike Frysinger <vapier@chromium.org>
Date: Thu Oct 19 09:51:44 2017

image_test: switch to @unittest.expectedFailure

The only point of the Forgiving/NonForgiving is so that forgiving tests
don't halt execution prematurely relative to non-forgiving tests, and so
the final exit status only reflects the non-forgiving tests.

The unittest module already provides an attribute that does this for us:
@unittest.expectedFailure.  Any tests marked with this will not halt the
overall execution and won't affect the exit status.  Replace our custom
infrastructure with this one attribute to simplify things greatly w/out
losing any functionality.

BUG= chromium:775932 
TEST=test_image & unittests still pass

Change-Id: I4a1a789e928d43e86605f3f40169d2e14e166b73
Reviewed-on: https://chromium-review.googlesource.com/726894
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>

[modify] https://crrev.com/3e04661dba1a09512ab38867377a4c63741b65d0/lib/image_test_lib.py
[modify] https://crrev.com/3e04661dba1a09512ab38867377a4c63741b65d0/scripts/test_image.py
[modify] https://crrev.com/3e04661dba1a09512ab38867377a4c63741b65d0/cros/test/image_test.py
[modify] https://crrev.com/3e04661dba1a09512ab38867377a4c63741b65d0/scripts/test_image_unittest.py

Project Member

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

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/6dd14f493cde82cb0d2c6d92d65e84bdede48982

commit 6dd14f493cde82cb0d2c6d92d65e84bdede48982
Author: Mike Frysinger <vapier@chromium.org>
Date: Thu Oct 19 19:56:51 2017

test_image: allow people to run specific tests

The current code runs all tests all the time.  This can be painful for
people adding new tests and doing iterative development.  Add support
for running specific unittests like standard python unittest runners.

Also add a --list option so people can quickly discover tests.

BUG= chromium:775932 
TEST=test_image & unittests still pass
TEST=running specific tests works

Change-Id: I5822190a91a168de6bd93489a41ac8deaf0d73de
Reviewed-on: https://chromium-review.googlesource.com/726895
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>

[modify] https://crrev.com/6dd14f493cde82cb0d2c6d92d65e84bdede48982/scripts/test_image.py

Status: Started (was: Available)
Should we mark this as fixed?
Components: -Build Infra>Client>ChromeOS>Build
Labels: -Type-Bug Type-Feature
Status: Fixed (was: Started)

Sign in to add a comment