Skip to content

Add --test-configuration flag for test configurations #538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2290,9 +2290,10 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
dict(name=['-c', '--clean'], action='store_true', help='Clean the build directory before compiling'),
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)"),
dict(name='--app-config', dest="app_config", help="Path of an app configuration file (Default is to look for 'mbed_app.json')"),
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"),
help='Find, build and run tests',
description=("Find, build, and run tests in a program and libraries"))
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):
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):
# Gather remaining arguments
args = remainder
# Find the root of the program
Expand Down Expand Up @@ -2335,6 +2336,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
+ (['-n', tests_by_name] if tests_by_name else [])
+ (['-v'] if verbose else [])
+ (['--app-config', app_config] if app_config else [])
+ (['--test-config', test_config] if test_config else [])
+ args,
env=env)

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

Expand Down