Skip to content

Commit

Permalink
Fix all izip leftover instances and improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
screamerbg committed May 30, 2018
1 parent db5bf16 commit ce135e5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 17 deletions.
43 changes: 30 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,48 +42,65 @@ jobs:
- run: cd .tests && mbed new supported-tests
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.6.0"
mbed update --clean "mbed-os-5.6.0"
echo "Testing mbed-os-5.8.5"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.8.5"
mbed compile -S
mbed compile --config --prefix mbed
mbed toolchain -S
mbed target -S
mbed export -S
mbed test --compile-list
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.5.0"
mbed update --clean "mbed-os-5.5.0"
echo "Testing mbed-os-5.7.6"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.7.5"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.4.0"
mbed update --clean "mbed-os-5.4.0"
echo "Testing mbed-os-5.6.6"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.6.5"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
mbed export -S
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.5.6"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.5.5"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.3.0"
mbed update --clean "mbed-os-5.3.0"
echo "Testing mbed-os-5.4.6"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.4.5"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.2.0"
mbed update --clean "mbed-os-5.2.0"
echo "Testing mbed-os-5.2.3"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.2.3"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.1.0"
mbed update --clean "mbed-os-5.1.0"
echo "Testing mbed-os-5.1.5"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.1.5"
mbed compile -S
mbed toolchain -S
mbed target -S
Expand Down
8 changes: 4 additions & 4 deletions mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
+ list(chain.from_iterable(zip(repeat('--profile'), profile or [])))
+ list(chain.from_iterable(zip(repeat('--source'), source)))
+ (['-v'] if verbose else [])
+ (list(chain.from_iterable(izip(repeat('--prefix'), config_prefix))) if config_prefix else []),
+ (list(chain.from_iterable(zip(repeat('--prefix'), config_prefix))) if config_prefix else []),
env=env)
else:
# If the user hasn't supplied a build directory, ignore the default build directory
Expand Down Expand Up @@ -2602,7 +2602,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi

if compile_list:
popen([python_cmd, '-u', os.path.join(tools_dir, 'test.py'), '--list']
+ list(chain.from_iterable(list(izip(repeat('--profile'), profile or []))))
+ list(chain.from_iterable(list(zip(repeat('--profile'), profile or []))))
+ ['-t', tchain, '-m', target]
+ list(chain.from_iterable(zip(repeat('--source'), source)))
+ (['-n', tests_by_name] if tests_by_name else [])
Expand Down Expand Up @@ -2693,11 +2693,11 @@ def export(ide=None, target=None, source=False, clean=False, supported=False, ap
program.ignore_build_dir()

popen([python_cmd, '-u', os.path.join(tools_dir, 'project.py')]
+ list(chain.from_iterable(izip(repeat('-D'), macros)))
+ list(chain.from_iterable(zip(repeat('-D'), macros)))
+ ['-i', ide.lower()]
+ ['-m', target]
+ (['-c'] if clean else [])
+ list(chain.from_iterable(izip(repeat('--source'), source)))
+ list(chain.from_iterable(zip(repeat('--source'), source)))
+ (['--app-config', app_config] if app_config else [])
+ args,
env=env)
Expand Down

0 comments on commit ce135e5

Please sign in to comment.