infra[_internal] test.py: bring back globs for limiting test selection |
||||||||
Issue description
It used to be possible to limit almost arbitrarily which tests to run from O(1k) we have in infra. Recent changes in issue 606878 broke my workflow.
My workflow:
Every time I flush buffer from my editor
the tests are run automatically [1]
I don't want to wait 5-10 seconds (worse on a laptop)
till all infra or CQ tests finish running.
So, I used to limit tests to be run to just those I'm currently fixing.
In such a case, however, coverage is not important,
so I couldn't care less about failure to load coverage.rc [2]
[1] inode events on linux are awesome. Ping me if you want to ready-made support tooling.
[2] ./test.py test infra.libs
Running infra.libs...
Traceback (most recent call last):
File "ENV/bin/expect_tests", line 29, in <module>
expect_tests.main()
File "infra/ENV/local/lib/python2.7/site-packages/expect_tests/main.py", line
170, in main
coveragerc=opts.coveragerc)
File "infra/ENV/local/lib/python2.7/site-packages/expect_tests/cover.py", line
98, in __init__
self.cov = coverage.coverage(**self.opts)
File "infra/ENV/local/lib/python2.7/site-packages/coverage/control.py", line
140, in __init__
"Couldn't read '%s' as a config file" % config_file
coverage.misc.CoverageException: Couldn't read 'infra/infra.libs/.coveragerc' as
a config file
Tests failed in modules:
infra.libs
,
Jun 6 2016
Issue 617775 has been merged into this issue.
,
Jun 6 2016
> #1
this is not a fix, but a workaround that someone has to search for
also --no-coverage does not work for me:
infra $ (master) ./test.py test --no-coverage infra/libs/git2
Running infra...
usage: expect_tests [-h] {debug,test,train,list} ...
expect_tests: error: unrecognized arguments: infra/libs/git2
Running infra_libs...
usage: expect_tests [-h] {debug,test,train,list} ...
expect_tests: error: unrecognized arguments: infra/libs/git2
Running appengine_module...
usage: expect_tests [-h] {debug,test,train,list} ...
expect_tests: error: unrecognized arguments: infra/libs/git2
Running appengine/annotation-parser...
usage: expect_tests [-h] {debug,test,train,list} ...
expect_tests: error: unrecognized arguments: infra/libs/git2
Running appengine/bugdroid...
usage: expect_tests [-h] {debug,test,train,list} ...
expect_tests: error: unrecognized arguments: infra/libs/git2
Running appengine/chrome_infra_console...
usage: expect_tests [-h] {debug,test,train,list} ...
expect_tests: error: unrecognized arguments: infra/libs/git2
Running appengine/chrome_infra_console_loadtest...
usage: expect_tests [-h] {debug,test,train,list} ...
expect_tests: error: unrecognized arguments: infra/libs/git2
Running appengine/chrome_infra_packages...
usage: expect_tests [-h] {debug,test,train,list} ...
expect_tests: error: unrecognized arguments: infra/libs/git2
Running appengine/chrome_infra_stats...
usage: expect_tests [-h] {debug,test,train,list} ...
expect_tests: error: unrecognized arguments: infra/libs/git2
Running appengine/chromium_bugs...
usage: expect_tests [-h] {debug,test,train,list} ...
,
Jun 6 2016
In issue 617775 sergeyberezine wrote: I'm aware, and it was a design decision at the time. Missing coverage was more important than the ability to select subsets of tests. That feature was also broken in other subtle ways even before my change. Merging with an existing issue with a proposed temporary resolution. --- This is a broken design. If I do `fetch infra` and run ./test.py it suggests Run one given test in the infra package: ./test.py test infra/libs/git2/test:*testCommitBogus and if I do ./test.py test infra/libs/git2/test:*testCommitBogus it fails. Please fix it.
,
Jun 7 2016
Looks like argument parsing is broken ./test.py test appengine/cr-buildbucket/swarming/ works ./test.py test --verbose appengine/cr-buildbucket/swarming/ doesn't. This could not be a part of solution design. Please fix it.
,
Jun 10 2016
,
Jun 28 2016
,
Jun 28 2016
,
Aug 3 2016
,
Aug 24 2016
I'm not actually working on this. Lowering priority, it's not really that urgent. A proper fix would be to refactor expect_tests so it's a proper library, and the arguments are parsed in test.py. The amount of work at this point doesn't seem worth the benefit though.
,
Aug 25 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by sergeybe...@chromium.org
, Jun 3 2016