mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-01 02:54:25 +02:00
Refactor "test_ignore" to accepts test names separated with comma // Resolve #753
This commit is contained in:
@@ -802,9 +802,9 @@ Test options
|
|||||||
.. seealso::
|
.. seealso::
|
||||||
Please make sure to read :ref:`unit_testing` guide first.
|
Please make sure to read :ref:`unit_testing` guide first.
|
||||||
|
|
||||||
Ignore tests where the name matches specified patterns.
|
Ignore tests where the name matches specified patterns. Multiple names are
|
||||||
More than one pattern is allowed (multi-lines). Also, you can ignore some
|
allowed. Please separate them using comma ``,`` symbol. Also, you can
|
||||||
tests using :option:`platformio test --ignore` command.
|
ignore some tests using :option:`platformio test --ignore` command.
|
||||||
|
|
||||||
.. list-table::
|
.. list-table::
|
||||||
:header-rows: 1
|
:header-rows: 1
|
||||||
@@ -829,9 +829,7 @@ tests using :option:`platformio test --ignore` command.
|
|||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[env:myenv]
|
[env:myenv]
|
||||||
test_ignore =
|
test_ignore = footest, bartest_*, test[13]
|
||||||
mytest*
|
|
||||||
test[13]
|
|
||||||
|
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
@@ -72,7 +72,7 @@ def cli(ctx, environment, ignore, upload_port, project_dir, verbose):
|
|||||||
if projectconf.has_option(section, "test_ignore"):
|
if projectconf.has_option(section, "test_ignore"):
|
||||||
_ignore.extend([p.strip()
|
_ignore.extend([p.strip()
|
||||||
for p in projectconf.get(
|
for p in projectconf.get(
|
||||||
section, "test_ignore").split("\n")
|
section, "test_ignore").split(",")
|
||||||
if p.strip()])
|
if p.strip()])
|
||||||
if testname != "*" and \
|
if testname != "*" and \
|
||||||
any([fnmatch(testname, p) for p in _ignore]):
|
any([fnmatch(testname, p) for p in _ignore]):
|
||||||
|
Reference in New Issue
Block a user