Skip to content

Commit 062f8f9

Browse files
committed
Changing commands for listing tests to be more consistent with compile and run commands
1 parent 19fcca9 commit 062f8f9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mbed/mbed.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,8 +1930,8 @@ def compile(toolchain=None, mcu=None, source=False, build=False, compile_library
19301930
@subcommand('test',
19311931
dict(name=['-t', '--toolchain'], help='Compile toolchain. Example: ARM, uARM, GCC_ARM, IAR'),
19321932
dict(name=['-m', '--mcu'], help='Compile target. Example: K64F, NUCLEO_F401RE, NRF51822...'),
1933-
dict(name='--list-compile', dest='list_compile', action='store_true', help='List all tests that can be built'),
1934-
dict(name='--list-run', dest='list_run', action='store_true', help='List all built tests that can be ran'),
1933+
dict(name='--compile-list', dest='compile_list', action='store_true', help='List all tests that can be built'),
1934+
dict(name='--run-list', dest='run_list', action='store_true', help='List all built tests that can be ran'),
19351935
dict(name='--compile', dest='compile_only', action='store_true', help='Only compile tests'),
19361936
dict(name='--run', dest='run_only', action='store_true', help='Only run tests'),
19371937
dict(name=['-n', '--tests-by-name'], dest='tests_by_name', help='Limit the tests to a list (ex. test1,test2,test3)'),
@@ -1941,7 +1941,7 @@ def compile(toolchain=None, mcu=None, source=False, build=False, compile_library
19411941
dict(name='--test-spec', dest="test_spec", help="Destination path for the test spec file used when running tests (only override if a test spec file that can be used by the Greentea automated test tool. The default is placed in the build directory"),
19421942
help='Find, build and run tests',
19431943
description=("Find, build, and run tests in a program and libraries"))
1944-
def test_(toolchain=None, mcu=None, list_compile=False, list_run=False, compile_only=False, run_only=False, tests_by_name=None, source=False, build=False, clean=False, test_spec=None):
1944+
def test_(toolchain=None, mcu=None, compile_list=False, run_list=False, compile_only=False, run_only=False, tests_by_name=None, source=False, build=False, clean=False, test_spec=None):
19451945
# Gather remaining arguments
19461946
args = remainder
19471947
# Find the root of the program
@@ -1971,7 +1971,7 @@ def test_(toolchain=None, mcu=None, list_compile=False, list_run=False, compile_
19711971
test_spec = os.path.join(build, 'test_spec.json')
19721972

19731973
# Determine if building and running tests
1974-
build_and_run_tests = not list_compile and not list_run and not compile_only and not run_only
1974+
build_and_run_tests = not compile_list and not run_list and not compile_only and not run_only
19751975

19761976
if compile_only or build_and_run_tests:
19771977
cmd = ['python', '-u', os.path.join(tools_dir, 'test.py')]
@@ -1999,7 +1999,7 @@ def test_(toolchain=None, mcu=None, list_compile=False, list_run=False, compile_
19991999
except ProcessException:
20002000
error('Failed to run test runner')
20012001

2002-
if list_compile:
2002+
if compile_list:
20032003
cmd = ['python', '-u', os.path.join(tools_dir, 'test.py'), '--list']
20042004
cmd += (['-n', tests_by_name] if tests_by_name else [])
20052005
cmd += (['-v'] if very_verbose else [])
@@ -2009,7 +2009,7 @@ def test_(toolchain=None, mcu=None, list_compile=False, list_run=False, compile_
20092009
except ProcessException:
20102010
error('Failed to run buildable tests listing script')
20112011

2012-
if list_run:
2012+
if run_list:
20132013
cmd = ['mbedgt', '--test-spec', test_spec, '--list']
20142014
cmd += (['-n', tests_by_name] if tests_by_name else [])
20152015
cmd += (['-V'] if verbose else [])

0 commit comments

Comments
 (0)