ImageTest: allow running individual tests |
||||
Issue descriptionWhen 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.
,
Oct 18 2017
this could use some merging with our existing test frameworks to get such functionality for free
,
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
,
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
,
Oct 25 2017
Should we mark this as fixed?
,
Jul 19
|
||||
►
Sign in to add a comment |
||||
Comment 1 by jorgelo@chromium.org
, Oct 18 2017