Skip to content
Snippets Groups Projects
Commit 174b25cc authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

den-generate-tasks: check that all required variants are passed in

parent ab7bcbb0
No related branches found
No related tags found
2 merge requests!45Cleanups,!40clone git too
......@@ -24,6 +24,10 @@
pass
class MissingBinEnvInputVar(KeyError):
pass
class InvalidBrick(RuntimeError):
def __init__(self, message, brick_file) -> None:
message = f"'{brick_file}': {message}"
......
......@@ -14,6 +14,7 @@
from poulpe import (
den as den_mod,
binenvs as bin_env_mod,
errors,
)
from poulpe.runner import (
RETURN_CODE_EXEC_ISSUE,
......@@ -60,8 +61,13 @@
for target in target_bins:
setup = available[target.suite_name]
parameters = setup.get_parameters()
# XXX check that all requires argument are passed
# XXX create the combination
for name, info in parameters.items():
if info.get("default") is None and name not in target.arguments:
raise errors.MissingDataEnvInputVar(
f"bin-env setup '{setup._path}' expects a value for the '{name}' parameter"
)
# TODO create the missing combinations?
variants.append(target.task_bin_spec())
return variants
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment