From 3e380b1db2e7d41f8296a6cd8096055f551984ac Mon Sep 17 00:00:00 2001 From: Chris Kay Date: Tue, 7 Aug 2018 14:01:29 +0100 Subject: [PATCH 1/3] doc: Remove reference to maintainers.md While supposedly valid syntax, Doxygen does not seem to like this link. Removing until we can identify an alternative. Change-Id: I2dd5057b9831c9c8a41bb9e99b8b278d9844ec59 Signed-off-by: Chris Kay --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index e79b18611..96518d754 100644 --- a/readme.md +++ b/readme.md @@ -123,8 +123,8 @@ The software is provided under a [BSD-3-Clause license](https://spdx.org/license Feedback and Support -------------------- -Arm welcomes any feedback on SCP-firmware. Please contact the maintainers ( -see [maintainers.md](./maintainers.md)). +Arm welcomes any feedback on SCP-firmware. Please contact the maintainers (see +maintainers.md). To request support please contact Arm by email at support@arm.com. Arm licensees may also contact Arm via their partner managers. -- GitLab From 857b265ea2454fddbc86c707b1c7bcfdaeab7e5f Mon Sep 17 00:00:00 2001 From: Chris Kay Date: Tue, 14 Aug 2018 15:48:23 +0100 Subject: [PATCH 2/3] python: Fix PyCodeStyle errors Change-Id: Idcebd8d6c3d1c1faede819caec3114ddbdfae51c Signed-off-by: Chris Kay --- tools/build_string.py | 2 +- tools/check_copyright.py | 6 +++--- tools/check_spacing.py | 2 +- tools/check_style.py | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/build_string.py b/tools/build_string.py index d9cc38db6..7a3732f81 100755 --- a/tools/build_string.py +++ b/tools/build_string.py @@ -16,7 +16,7 @@ def main(): cmd = 'git describe --tags --dirty --always' output = subprocess.check_output(cmd.split()) git_string = output.decode('utf-8').strip() - except: + except BaseException: git_string = 'Unknown' print("{}-{}".format(datetime.now().strftime('%Y-%m-%d_%H-%M-%S'), diff --git a/tools/check_copyright.py b/tools/check_copyright.py index 8901d0f96..584bbbcb5 100755 --- a/tools/check_copyright.py +++ b/tools/check_copyright.py @@ -47,15 +47,15 @@ FILE_TYPES = [ # # Supported comment styles (Python regex) # -COMMENT_PATTERN = '^(( \*)|(;)|(\#))' +COMMENT_PATTERN = '^(( \\*)|(;)|(\\#))' # # License pattern to match # LICENSE_PATTERN = \ '{0} Arm SCP/MCP Software$\n'\ - '{0} Copyright \(c\) (?P[0-9]{{4}}(-[0-9]{{4}})?), Arm Limited and'\ - ' Contributors. All rights reserved.$\n'\ + '{0} Copyright \\(c\\) (?P[0-9]{{4}}(-[0-9]{{4}})?), Arm Limited '\ + 'and Contributors. All rights reserved.$\n'\ '{0}$\n'\ '{0} SPDX-License-Identifier: BSD-3-Clause$\n'\ .format(COMMENT_PATTERN) diff --git a/tools/check_spacing.py b/tools/check_spacing.py index 49bc128a9..afbb668b2 100755 --- a/tools/check_spacing.py +++ b/tools/check_spacing.py @@ -120,7 +120,7 @@ def main(argv=[], prog_name=''): for keyword in KEYWORDS: regex_patterns[keyword] = re.compile( - '(.*\W)(%s)(\s*)(\(.*)' % keyword) + '(.*\\W)(%s)(\\s*)(\\(.*)' % keyword) # # Check files # diff --git a/tools/check_style.py b/tools/check_style.py index 7e6665dec..caebae5ac 100755 --- a/tools/check_style.py +++ b/tools/check_style.py @@ -166,5 +166,6 @@ def main(argv=[], prog_name=''): print('PASSED: No files contained coding style errors.') return 0 + if __name__ == '__main__': sys.exit(main(sys.argv[1:], sys.argv[0])) -- GitLab From 8eb6fcb0cb66d1ccefb3f6ff2015dfe878d7206b Mon Sep 17 00:00:00 2001 From: Chris Kay Date: Tue, 7 Aug 2018 11:59:34 +0100 Subject: [PATCH 3/3] tools: Update CI script This commit moves PEP8 to PyCodeStyle and ensures the build environment for each compilation is using the correct toolchain. Change-Id: I7c26c94c6b1d2cc072eda80307246a2ae21c1c0f Signed-off-by: Chris Kay --- tools/ci.py | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/tools/ci.py b/tools/ci.py index c0e276b14..b31a5d3f7 100755 --- a/tools/ci.py +++ b/tools/ci.py @@ -37,43 +37,55 @@ def main(): result = check_doc.main() results.append(('Check doc', result)) - result = subprocess.call('pep8 tools/', shell=True) - results.append(('PEP8', result)) + result = subprocess.call('python -m pycodestyle tools/', shell=True) + results.append(('PyCodeStyle', result)) banner('Build and run framework tests') - result = subprocess.call('make clean test', shell=True) + result = subprocess.call('CC=gcc make clean test', shell=True) results.append(('Framework tests', result)) banner('Test building the framework library') - cmd = 'CROSS_COMPILE= BS_FIRMWARE_CPU=host make lib-framework' + cmd = \ + 'CC=gcc CROSS_COMPILE= BS_FIRMWARE_CPU=host ' \ + 'make clean lib-framework' result = subprocess.call(cmd, shell=True) - results.append(('Framework build (host)', result)) + results.append(('Framework build (Host, GCC)', result)) - cmd = 'CROSS_COMPILE=arm-none-eabi- BS_FIRMWARE_CPU=cortex-m3 make '\ - 'lib-framework' + cmd = \ + 'CC=arm-none-eabi-gcc CROSS_COMPILE=arm-none-eabi- ' \ + 'BS_FIRMWARE_CPU=cortex-m3 ' \ + 'make clean lib-framework' result = subprocess.call(cmd, shell=True) - results.append(('Framework build (Cortex-M3)', result)) + results.append(('Framework build (Cortex-M3, GCC)', result)) banner('Test building arch library') - cmd = 'CROSS_COMPILE=arm-none-eabi- BS_FIRMWARE_CPU=cortex-m3 make '\ - 'lib-arch' + cmd = \ + 'CC=arm-none-eabi-gcc CROSS_COMPILE=arm-none-eabi- ' \ + 'BS_FIRMWARE_CPU=cortex-m3 ' \ + 'make clean lib-arch' result = subprocess.call(cmd, shell=True) - results.append(('Arch build (Cortex-M3)', result)) + results.append(('Arch build (Cortex-M3, GCC)', result)) banner('Test building host product') - cmd = 'CROSS_COMPILE= PRODUCT=host make ' + cmd = \ + 'CC=gcc CROSS_COMPILE= ' \ + 'PRODUCT=host ' \ + 'make clean all' result = subprocess.call(cmd, shell=True) - results.append(('Product host build', result)) + results.append(('Product host build (GCC)', result)) banner('Test building sgm775 product') - cmd = 'CROSS_COMPILE=arm-none-eabi- PRODUCT=sgm775 make' + cmd = \ + 'CC=arm-none-eabi-gcc CROSS_COMPILE=arm-none-eabi- ' \ + 'PRODUCT=sgm775 ' \ + 'make clean all' result = subprocess.call(cmd, shell=True) - results.append(('Product sgm775 build', result)) + results.append(('Product sgm775 build (GCC)', result)) banner('Tests summary') -- GitLab