Skip to content

Commit ed14f9e

Browse files
authored
Merge pull request #538 from sarahmarshy/test-configs
Add --test-configuration flag for test configurations
2 parents d5e9539 + 4b28e2d commit ed14f9e

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
@@ -2290,9 +2290,10 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
22902290
dict(name=['-c', '--clean'], action='store_true', help='Clean the build directory before compiling'),
22912291
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)"),
22922292
dict(name='--app-config', dest="app_config", help="Path of an app configuration file (Default is to look for 'mbed_app.json')"),
2293+
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"),
22932294
help='Find, build and run tests',
22942295
description=("Find, build, and run tests in a program and libraries"))
2295-
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):
2296+
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):
22962297
# Gather remaining arguments
22972298
args = remainder
22982299
# Find the root of the program
@@ -2335,6 +2336,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
23352336
+ (['-n', tests_by_name] if tests_by_name else [])
23362337
+ (['-v'] if verbose else [])
23372338
+ (['--app-config', app_config] if app_config else [])
2339+
+ (['--test-config', test_config] if test_config else [])
23382340
+ args,
23392341
env=env)
23402342

@@ -2354,6 +2356,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
23542356
+ (['-n', tests_by_name] if tests_by_name else [])
23552357
+ (['-v'] if verbose else [])
23562358
+ (['--app-config', app_config] if app_config else [])
2359+
+ (['--test-config', test_config] if test_config else [])
23572360
+ args,
23582361
env=env)
23592362

0 commit comments

Comments
 (0)