From 43bad7c0ddbfa57b705383aec52a062921f3aa5a Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Fri, 23 Feb 2018 15:56:50 -0600 Subject: [PATCH 1/3] Travis: Tore out python3 testing to get CI working again Temporary solution, python3 will be added back later Travis doesn't recognize version matrices when inside a matrix include job. Instead, it breaks in a way that isn't reported as an error. --- .travis.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9de3c6c155d..2e83469542a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ env: --data @- << DATA\n{ "state": "$0", "description": "$1", - "context": "travis-ci/$NAME/$(python --version)", + "context": "travis-ci/$NAME", "target_url": "https://travis-ci.org/$TRAVIS_REPO_SLUG/jobs/$TRAVIS_JOB_ID" }\nDATA' @@ -74,10 +74,6 @@ matrix: - env: - NAME=tools - python: - - '2.7' - - '3.5' - - '3.6' install: # Install dependencies - sudo apt-get install gcc-arm-embedded @@ -89,7 +85,7 @@ matrix: script: # Run local testing on tools - PYTHONPATH=. coverage run -a -m pytest tools/test - - python2 tools/test/pylint.py + - python tools/test/pylint.py - coverage run -a tools/project.py -S | sed -n '/^Total/p' - coverage html after_success: @@ -199,8 +195,3 @@ matrix: env: NAME=mbed2-NUVOTON - <<: *mbed-2 env: NAME=mbed2-RENESAS - # Change python version here only because 3x the other jobs does not add any more coverage - python: - - '2.7' - - '3.5' - - '3.6' From 5a108166f02a856207c3fcee2ff07525f8920191 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Mon, 26 Feb 2018 17:04:03 -0600 Subject: [PATCH 2/3] tools: Fixed small unicode issue in config tests --- tools/test/config/invalid_key/test_data.json | 2 +- tools/test/config/invalid_key_lib/test_data.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/config/invalid_key/test_data.json b/tools/test/config/invalid_key/test_data.json index c86542f1aab..8c17e13f91c 100644 --- a/tools/test/config/invalid_key/test_data.json +++ b/tools/test/config/invalid_key/test_data.json @@ -1,5 +1,5 @@ { "K64F": { - "exception_msg": "Additional properties are not allowed ('unknown_key' was unexpected)" + "exception_msg": "Additional properties are not allowed (u'unknown_key' was unexpected)" } } diff --git a/tools/test/config/invalid_key_lib/test_data.json b/tools/test/config/invalid_key_lib/test_data.json index c86542f1aab..8c17e13f91c 100644 --- a/tools/test/config/invalid_key_lib/test_data.json +++ b/tools/test/config/invalid_key_lib/test_data.json @@ -1,5 +1,5 @@ { "K64F": { - "exception_msg": "Additional properties are not allowed ('unknown_key' was unexpected)" + "exception_msg": "Additional properties are not allowed (u'unknown_key' was unexpected)" } } From 24bb55612779791b15be83b2d30452616575e458 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Mon, 26 Feb 2018 17:21:42 -0600 Subject: [PATCH 3/3] tools: Removed outdated (and broken) toolchain initialization test Also moved the access of build_dir into condition on secure in ARMC6 per theotherjimmy --- tools/test/toolchains/api_test.py | 7 ------- tools/toolchains/arm.py | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/test/toolchains/api_test.py b/tools/test/toolchains/api_test.py index d98b1cef1b2..228d6b1f083 100644 --- a/tools/test/toolchains/api_test.py +++ b/tools/test/toolchains/api_test.py @@ -15,13 +15,6 @@ Resources, TOOLCHAIN_PATHS, mbedToolchain from tools.targets import TARGET_MAP -def test_instantiation(): - """Test that all exported toolchain may be instantiated""" - for name, tc_class in TOOLCHAIN_CLASSES.items(): - cls = tc_class(TARGET_MAP["K64F"]) - assert name == cls.name or\ - name == LEGACY_TOOLCHAIN_NAMES[cls.name] - ALPHABET = [char for char in printable if char not in [u'.', u'/']] @given(fixed_dictionaries({ diff --git a/tools/toolchains/arm.py b/tools/toolchains/arm.py index 39ea3182108..2df0bfac10d 100644 --- a/tools/toolchains/arm.py +++ b/tools/toolchains/arm.py @@ -309,7 +309,6 @@ def __init__(self, target, *args, **kwargs): raise NotSupportedException( "this compiler does not support the core %s" % target.core) - build_dir = kwargs['build_dir'] if not set(("ARM", "ARMC6")).intersection(set(target.supported_toolchains)): raise NotSupportedException("ARM/ARMC6 compiler support is required for ARMC6 build") @@ -349,6 +348,7 @@ def __init__(self, target, *args, **kwargs): # Create Secure library if target.core == "Cortex-M23" or self.target.core == "Cortex-M33": + build_dir = kwargs['build_dir'] secure_file = join(build_dir, "cmse_lib.o") self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]