Skip to content

Commit

Permalink
Merge pull request #1118 from blishko/hornix-version-processing
Browse files Browse the repository at this point in the history
Hornix: Get only version number, without the name of the tool
  • Loading branch information
PhilippWendler authored Nov 21, 2024
2 parents 5dd8ff2 + e0ff7a0 commit 9a85ef3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion benchexec/tools/hornix.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#
# SPDX-License-Identifier: Apache-2.0

import re

import benchexec
import benchexec.result as result

Expand All @@ -21,7 +23,10 @@ def executable(self, tool_locator):
return tool_locator.find_executable("hornix")

def version(self, executable):
return self._version_from_tool(executable, arg="--version")
output = self._version_from_tool(executable, arg="--version")
version_pattern = r"\d+\.\d+\.\d+"
match = re.search(version_pattern, output)
return match.group(0) if match else ""

def name(self):
"""The human-readable name of the tool."""
Expand Down

0 comments on commit 9a85ef3

Please sign in to comment.