From cf0ce1508ef9ad9525497647a66de240a40e3f4d Mon Sep 17 00:00:00 2001 From: DaanDeMeyer Date: Tue, 1 Jul 2025 22:44:46 +0200 Subject: [PATCH] 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. --- tests/test_config.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.47.2