west: runners: openocd: Handle ADI OpenOCD fork version format
The ADI fork of OpenOCD prints a modified version line; adjusting the regex to account for that different format when checking the OpenOCD version. Signed-off-by: Pete Johanson <pete.johanson@analog.com>
This commit is contained in:
parent
3598c413ed
commit
1c05f2121c
1 changed files with 2 additions and 1 deletions
|
@ -232,7 +232,8 @@ class OpenOcdBinaryRunner(ZephyrBinaryRunner):
|
|||
out = self.check_output([self.openocd_cmd[0], '--version'],
|
||||
stderr=subprocess.STDOUT).decode()
|
||||
|
||||
version_match = re.search(r"Open On-Chip Debugger v?(\d+.\d+.\d+)", out)
|
||||
# Account for version info format of ADI fork of OpenOCD as well
|
||||
version_match = re.search(r"Open On-Chip Debugger.* v?(\d+.\d+.\d+)[ \n]", out)
|
||||
version = version_match.group(1).split('.')
|
||||
|
||||
return [to_num(i) for i in version]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue