Skip to content

Commit

Permalink
Merge pull request #1114 from sosy-lab/task-definition-format-2.1
Browse files Browse the repository at this point in the history
Add support for task definitions in format version 2.1
  • Loading branch information
dbeyer authored Nov 20, 2024
2 parents 638480c + 48ebb8b commit 6f964ac
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions benchexec/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
_EXPECTED_RESULT_FILTER_VALUES = {True: "true", False: "false", None: "unknown"}
_WARNED_ABOUT_UNSUPPORTED_EXPECTED_RESULT_FILTER = False

_TASK_DEF_VERSIONS = frozenset(["0.1", "1.0", "2.0"])
_TASK_DEF_VERSIONS = frozenset(["0.1", "1.0", "2.0", "2.1"])


def substitute_vars(oldList, runSet=None, task_file=None):
Expand Down Expand Up @@ -107,12 +107,18 @@ def load_task_definition_file(task_def_file):
f"invalid format_version '{task_def.get('format_version')}'."
)

if format_version != "2.0" and "options" in task_def:
if format_version not in ["2.0", "2.1"] and "options" in task_def:
raise BenchExecException(
f"Task-definition file {task_def_file} specifies invalid key 'options', "
f"format_version needs to be at least 2.0 for this."
)

if format_version != "2.1" and "additional_information" in task_def:
raise BenchExecException(
f"Task-definition file {task_def_file} specifies invalid key 'additional_information', "
f"format_version needs to be at least 2.1 for this."
)

return task_def


Expand Down

0 comments on commit 6f964ac

Please sign in to comment.