distribution: Distribution
release: str
tools_tree_distribution: Optional[Distribution]
+ debug_shell: bool
def __init__(self, config: Config, options: Sequence[PathString] = []) -> None:
self.options = options
def build(self, options: Sequence[str] = (), args: Sequence[str] = ()) -> CompletedProcess:
return self.mkosi(
"build",
- [*options, "--debug", "--force"],
+ [*options, "--debug", "--force", *(["--debug-shell"] if self.config.debug_shell else [])],
args,
stdin=sys.stdin if sys.stdin.isatty() else None,
user=INVOKING_USER.uid,
type=Distribution,
choices=[Distribution(d) for d in Distribution.values()],
)
+ parser.addoption(
+ "--debug-shell",
+ help="Pass --debug-shell when running mkosi",
+ action="store_true",
+ )
@pytest.fixture(scope="session")
distribution=distribution,
release=release,
tools_tree_distribution=cast(Distribution, request.config.getoption("--tools-tree-distribution")),
+ debug_shell=request.config.getoption("--debug-shell"),
)