Refactor "test_ignore" to accepts test names separated with comma // Resolve #753

This commit is contained in:
Ivan Kravets
2016-08-21 19:32:11 +03:00
parent 0f7f301787
commit f5b4cb0ae8
2 changed files with 5 additions and 7 deletions

View File

@ -802,9 +802,9 @@ Test options
.. seealso::
Please make sure to read :ref:`unit_testing` guide first.
Ignore tests where the name matches specified patterns.
More than one pattern is allowed (multi-lines). Also, you can ignore some
tests using :option:`platformio test --ignore` command.
Ignore tests where the name matches specified patterns. Multiple names are
allowed. Please separate them using comma ``,`` symbol. Also, you can
ignore some tests using :option:`platformio test --ignore` command.
.. list-table::
:header-rows: 1
@ -829,9 +829,7 @@ tests using :option:`platformio test --ignore` command.
.. code-block:: ini
[env:myenv]
test_ignore =
mytest*
test[13]
test_ignore = footest, bartest_*, test[13]
-----------

View File

@ -72,7 +72,7 @@ def cli(ctx, environment, ignore, upload_port, project_dir, verbose):
if projectconf.has_option(section, "test_ignore"):
_ignore.extend([p.strip()
for p in projectconf.get(
section, "test_ignore").split("\n")
section, "test_ignore").split(",")
if p.strip()])
if testname != "*" and \
any([fnmatch(testname, p) for p in _ignore]):