Skip to content

Commit

Permalink
west: runners: add option 'v' prefix to OpenOCD version string
Browse files Browse the repository at this point in the history
The Espressif branch of OpenOCD uses the version string "v0.12.0" instead
of "0.12.0" causing the version regex match to fail.

Add an optional 'v' prefix to avoid the failure.

(cherry picked from commit 3d42a1c)

Original-Fixes: #83373
Original-Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
GitOrigin-RevId: 3d42a1c
Cr-Build-Id: 8726132470642320465
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8726132470642320465
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: I17a9f06c0895b3ff9d6a8247eed92e2e0a6d8efc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6167010
Tested-by: Keith Short <keithshort@chromium.org>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
  • Loading branch information
Eric Holmberg authored and Chromeos LUCI committed Jan 10, 2025
1 parent 8ee6e94 commit b081fa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/west_commands/runners/openocd.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def read_version(self):
out = self.check_output([self.openocd_cmd[0], '--version'],
stderr=subprocess.STDOUT).decode()

version_match = re.search(r"Open On-Chip Debugger (\d+.\d+.\d+)", out)
version_match = re.search(r"Open On-Chip Debugger v?(\d+.\d+.\d+)", out)
version = version_match.group(1).split('.')

return [to_num(i) for i in version]
Expand Down

0 comments on commit b081fa6

Please sign in to comment.