Skip to content

Commit 27012ff

Browse files
authored
Merge pull request #10618 from kjbracey-arm/gcc8
Tools: check for GCC 9, rather than 6
2 parents 0df07e6 + 5342f0f commit 27012ff

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

tools/test/toolchains/api_test.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,23 +155,31 @@ def test_gcc_version_check(_run_cmd):
155155
toolchain = TOOLCHAIN_CLASSES["GCC_ARM"](
156156
TARGET_MAP["K64F"], notify=notifier)
157157
toolchain.version_check()
158-
assert notifier.messages == []
158+
assert len(notifier.messages) == 1
159159
_run_cmd.return_value = ("""
160-
arm-none-eabi-gcc (Arch Repository) 8.1.0
161-
Copyright (C) 2018 Free Software Foundation, Inc.
160+
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
161+
Copyright (C) 2019 Free Software Foundation, Inc.
162162
This is free software; see the source for copying conditions. There is NO
163163
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
164164
""", "", 0)
165165
toolchain.version_check()
166166
assert len(notifier.messages) == 1
167167
_run_cmd.return_value = ("""
168+
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 10-2020-q4-major) 10.2.1 20201025 (release) [ARM/arm-10-branch revision 377599]
169+
Copyright (C) 2020 Free Software Foundation, Inc.
170+
This is free software; see the source for copying conditions. There is NO
171+
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
172+
""", "", 0)
173+
toolchain.version_check()
174+
assert len(notifier.messages) == 2
175+
_run_cmd.return_value = ("""
168176
arm-none-eabi-gcc (Arch Repository)
169177
Copyright (C) 2018 Free Software Foundation, Inc.
170178
This is free software; see the source for copying conditions. There is NO
171179
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
172180
""", "", 0)
173181
toolchain.version_check()
174-
assert len(notifier.messages) == 2
182+
assert len(notifier.messages) == 3
175183

176184

177185
@given(fixed_dictionaries({

tools/toolchains/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class GCC(mbedToolchain):
3232
STD_LIB_NAME = "lib%s.a"
3333
DIAGNOSTIC_PATTERN = re.compile('((?P<file>[^:]+):(?P<line>\d+):)(?P<col>\d+):? (?P<severity>warning|[eE]rror|fatal error): (?P<message>.+)')
3434

35-
GCC_RANGE = (LooseVersion("6.0.0"), LooseVersion("7.0.0"))
35+
GCC_RANGE = (LooseVersion("9.0.0"), LooseVersion("10.0.0"))
3636
GCC_VERSION_RE = re.compile(b"\d+\.\d+\.\d+")
3737

3838
def __init__(self, target, notify=None, macros=None, build_profile=None,

0 commit comments

Comments
 (0)