Skip to content

Commit

Permalink
Merge pull request #682 from screamerbg/f/backwards-comp
Browse files Browse the repository at this point in the history
Fix leftover issues from Python3 support
  • Loading branch information
screamerbg authored May 31, 2018
2 parents 502fa9c + 234cb99 commit 53c06cc
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 42 deletions.
101 changes: 65 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,52 +42,81 @@ 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"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
echo "Testing mbed-os-5.8.5"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.8.5"
mbed compile --supported
mbed compile --config --prefix mbed
mbed toolchain --supported
mbed target --supported
mbed export --supported
mbed test --compile-list
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.5.0"
mbed update --clean "mbed-os-5.5.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
echo "Testing mbed-os-5.7.6"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.7.5"
mbed compile --supported
mbed compile --config --prefix mbed
mbed toolchain --supported
mbed target --supported
mbed export --supported
mbed test --compile-list
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.4.0"
mbed update --clean "mbed-os-5.4.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
echo "Testing mbed-os-5.6.6"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.6.5"
mbed compile --supported
mbed compile --config --prefix mbed
mbed toolchain --supported
mbed target --supported
mbed export --supported
mbed test --compile-list
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.3.0"
mbed update --clean "mbed-os-5.3.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
echo "Testing mbed-os-5.5.6"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.5.5"
mbed compile --supported
mbed compile --config --prefix mbed
mbed toolchain --supported
mbed target --supported
mbed export --supported
mbed test --compile-list
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.2.0"
mbed update --clean "mbed-os-5.2.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
echo "Testing mbed-os-5.4.6"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.4.5"
mbed compile --supported
mbed compile --config --prefix mbed
mbed toolchain --supported
mbed target --supported
mbed export --supported
mbed test --compile-list
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.1.0"
mbed update --clean "mbed-os-5.1.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
echo "Testing mbed-os-5.2.3"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.2.3"
mbed compile --supported
mbed compile --config --prefix mbed
mbed toolchain --supported
mbed target --supported
mbed export --supported
mbed test --compile-list
- run: |-
cd .tests/supported-tests
echo "Testing mbed-os-5.1.5"
cd mbed-os
mbed update --clean --clean-files "mbed-os-5.1.5"
mbed compile --supported
mbed compile --config --prefix mbed
mbed toolchain --supported
mbed target --supported
mbed export --supported
mbed test --compile-list
py3:
machine: true
Expand Down
10 changes: 5 additions & 5 deletions mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


# Application version
ver = '1.7.1'
ver = '1.7.2'

# Default paths to Mercurial and Git
hg_cmd = 'hg'
Expand Down Expand Up @@ -2484,7 +2484,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 @@ -2605,7 +2605,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 @@ -2696,11 +2696,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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

setup(
name="mbed-cli",
version="1.7.1",
version="1.7.2",
description="Arm Mbed command line tool for repositories version control, publishing and updating code from remotely hosted repositories (GitHub, GitLab and mbed.com), and invoking Mbed OS own build system and export functions, among other operations",
long_description=LONG_DESC,
url='http://github.com/ARMmbed/mbed-cli',
Expand Down

0 comments on commit 53c06cc

Please sign in to comment.