diff --git a/HISTORY.rst b/HISTORY.rst index 45f024b5..fb34f947 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -16,6 +16,10 @@ PlatformIO 3.0 - Built-in into `PlatformIO IDE for Atom `__ and `PlatformIO IDE for VScode `__ - Integration with `Eclipse `__ and `Sublime Text `__ +* Filter `PIO Unit Testing `__ + tests using a new ``test_filter`` option in `Project Configuration File "platformio.ini" `__ + or `platformio test --filter `__ command + (`issue #934 `_) * Custom ``test_transport`` for `PIO Unit Testing `__ Engine * Configure Serial Port Monitor in `Project Configuration File "platformio.ini" `__ (`issue #787 `_) diff --git a/docs b/docs index d242df40..ffee09c3 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit d242df40dbb96bfe86dfacba43d7ba1782e2b15e +Subproject commit ffee09c3508d2fc6c1feac721662ebf106ba03cb diff --git a/platformio/commands/run.py b/platformio/commands/run.py index e6158e7d..403a0a15 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -134,10 +134,11 @@ class EnvironmentProcessor(object): "debug_extra_cmds", "debug_server", "debug_init_break", "debug_load_cmd") - IGNORE_BUILD_OPTIONS = ("test_transport", "test_ignore", "test_port", - "debug_tool", "debug_port", "debug_init_cmds", - "debug_extra_cmds", "debug_server", - "debug_init_break", "debug_load_cmd") + IGNORE_BUILD_OPTIONS = ("test_transport", "test_filter", "test_ignore", + "test_port", "debug_tool", "debug_port", + "debug_init_cmds", "debug_extra_cmds", + "debug_server", "debug_init_break", + "debug_load_cmd") REMAPED_OPTIONS = {"framework": "pioframework", "platform": "pioplatform"} diff --git a/platformio/commands/test.py b/platformio/commands/test.py index 30a5de6c..4c6414c9 100644 --- a/platformio/commands/test.py +++ b/platformio/commands/test.py @@ -22,7 +22,18 @@ from platformio.managers.core import pioplus_call @click.command("test", short_help="Local Unit Testing") @click.option("--environment", "-e", multiple=True, metavar="") -@click.option("--ignore", "-i", multiple=True, metavar="") +@click.option( + "--filter", + "-f", + multiple=True, + metavar="", + help="Filter tests by a pattern") +@click.option( + "--ignore", + "-i", + multiple=True, + metavar="", + help="Ignore tests by a pattern") @click.option("--upload-port") @click.option("--test-port") @click.option(