Skip to content

Commit f9ee35d

Browse files
committed
Add support for --ignore argument in test.py
Simply passes the parameter through when building with test.py For more details see ARMmbed/mbed-os#6833
1 parent 99e6dc1 commit f9ee35d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mbed/mbed.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2489,9 +2489,10 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
24892489
dict(name='--test-spec', dest="test_spec", help="Path used for the test spec file used when building and running tests (the default path is the build directory)"),
24902490
dict(name='--app-config', dest="app_config", help="Path of an app configuration file (Default is to look for 'mbed_app.json')"),
24912491
dict(name='--test-config', dest="test_config", help="Path or mbed OS keyword of a test configuration file. Example: ethernet, odin_wifi, or path/to/config.json"),
2492+
dict(name='--ignore', dest="ignore", help="Comma separated list of patterns to add to mbedignore. Example: ./main.cpp,./src/app/*"),
24922493
help='Find, build and run tests',
24932494
description="Find, build, and run tests in a program and libraries")
2494-
def test_(toolchain=None, target=None, compile_list=False, run_list=False, compile_only=False, run_only=False, tests_by_name=None, source=False, profile=False, build=False, clean=False, test_spec=None, app_config=None, test_config=None):
2495+
def test_(toolchain=None, target=None, compile_list=False, run_list=False, compile_only=False, run_only=False, tests_by_name=None, source=False, profile=False, build=False, clean=False, test_spec=None, app_config=None, test_config=None, ignore=None):
24952496
# Gather remaining arguments
24962497
args = remainder
24972498
# Find the root of the program
@@ -2535,6 +2536,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
25352536
+ (['-v'] if verbose else [])
25362537
+ (['--app-config', app_config] if app_config else [])
25372538
+ (['--test-config', test_config] if test_config else [])
2539+
+ (['--ignore', ignore] if ignore else [])
25382540
+ args,
25392541
env=env)
25402542

@@ -2555,6 +2557,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
25552557
+ (['-v'] if verbose else [])
25562558
+ (['--app-config', app_config] if app_config else [])
25572559
+ (['--test-config', test_config] if test_config else [])
2560+
+ (['--ignore', ignore] if ignore else [])
25582561
+ args,
25592562
env=env)
25602563

0 commit comments

Comments
 (0)