[Avocado-devel] list / run difference
Andrei Stepanov
astepano at redhat.com
Thu Nov 5 11:59:43 UTC 2015
Hello.
I get correct tests list for avocado `list' command.
While `run' command does not have tests to run.
The difference is about:
../avocado-vt/avocado/core/plugins/vt.py
def discover(self, url, which_tests=loader.DEFAULT):
`which_tests' for:
`run' has False
`list' has None
./avocado/core/loader.py
def discover(self, urls, which_tests=DEFAULT):
:param which_tests: Limit tests to be displayed (ALL, AVAILABLE or
DEFAULT)
DEFAULT = False # Show default tests (for execution)
`run' path:
def _make_test_suite(self, urls=None): from avocado/core/job.py
which_tests = loader.ALL if self.args.verbose else loader.AVAILABLE
try:
return
loader.loader.discover(paths,
which_tests=which_tests)
`list' path:
def _get_test_suite(self, paths): from avocado/core/plugins/test_list.py
suite =
loader.loader.discover(urls)
Solution:
_get_test_suite() should have:
which_tests = loader.ALL if self.args.verbose else loader.AVAILABLE
return loader.loader.discover(paths,
which_tests=which_tests)
or in:
def discover(self, urls,
which_tests=AVAILABLE):
What do you think?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20151105/0f2f7cbe/attachment.htm>
More information about the Avocado-devel
mailing list