e2e: disable Nix sandbox for cross-distro flake build test
- Update test_nix_build_pkgmgr.py to invoke
nix --option sandbox false build .#pkgmgr -L
to avoid sandbox/permission issues in Debian and Ubuntu containers.
- Keeps the test logic identical across all distros while ensuring
consistent flake build behaviour during E2E runs.
https://chatgpt.com/share/693aa33f-4e3c-800f-86ec-99c38a07eacb
This commit is contained in:
@@ -69,8 +69,13 @@ class TestNixBuildPkgmgrAllDistros(unittest.TestCase):
|
||||
_run_cmd(["id"])
|
||||
|
||||
# --- nix build .#pkgmgr -L ---
|
||||
proc = _run_cmd(["nix", "build", ".#pkgmgr", "-L"])
|
||||
|
||||
proc = _run_cmd([
|
||||
"nix",
|
||||
"--option", "sandbox", "false",
|
||||
"build", ".#pkgmgr",
|
||||
"-L",
|
||||
])
|
||||
|
||||
if proc.returncode != 0:
|
||||
raise AssertionError(
|
||||
"nix build .#pkgmgr -L failed inside the test container.\n"
|
||||
|
||||
Reference in New Issue
Block a user