Skip to content

Commit d4e3f78

Browse files
author
Olli-Pekka Puolitaival
committed
Fix greentea logic to be same as original
1 parent a45a60f commit d4e3f78

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

mbed/mbed.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2740,13 +2740,19 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
27402740

27412741
# Greentea tests
27422742
if greentea:
2743-
greentea_command = ['mbedgt', '--test-spec', test_spec] \
2744-
+ (['-n', tests_by_name] if tests_by_name else []) \
2745-
+ (['-V'] if verbose else []) \
2746-
+ args
2743+
if run_list:
2744+
popen(['mbedgt', '--test-spec', test_spec, '--list']
2745+
+ (['-n', tests_by_name] if tests_by_name else [])
2746+
+ (['-V'] if verbose else [])
2747+
+ args,
2748+
env=env)
27472749

27482750
if run_only or build_and_run_tests:
2749-
popen(greentea_command, env=env)
2751+
popen(['mbedgt', '--test-spec', test_spec]
2752+
+ (['-n', tests_by_name] if tests_by_name else [])
2753+
+ (['-V'] if verbose else [])
2754+
+ args,
2755+
env=env)
27502756

27512757
# Icetea tests
27522758
if icetea:

0 commit comments

Comments
 (0)