From: DaanDeMeyer Date: Tue, 1 Jul 2025 20:44:46 +0000 (+0200) Subject: tests: Skip test_tools() when in sandbox X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3788%2Fhead;p=thirdparty%2Fmkosi.git tests: Skip test_tools() when in sandbox If we're running inside mkosi sandbox, we don't parse the default tools tree configuration, which this test depends on, so skip it when running in the sandbox. --- diff --git a/tests/test_config.py b/tests/test_config.py index ff9c2b9fe..acd446adf 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -21,6 +21,7 @@ from mkosi.config import ( OutputFormat, Verb, config_parse_bytes, + in_sandbox, parse_config, parse_ini, ) @@ -1486,6 +1487,9 @@ def test_tools(tmp_path: Path) -> None: d = tmp_path argv = ["--tools-tree=default"] + if in_sandbox(): + pytest.skip("Cannot run test_tools() test within mkosi sandbox environment") + with resource_path(mkosi.resources) as resources, chdir(d): _, tools, _ = parse_config(argv, resources=resources) assert tools