Refactor pkgmgr into modular installer pipeline with Nix flake support, PKGBUILD build workflow, local Nix cache, and full test suite restructuring.

See conversation: https://chatgpt.com/share/69332519-7ff4-800f-bc21-7fcd24a66c10
This commit is contained in:
Kevin Veen-Birkenbach
2025-12-05 19:32:42 +01:00
parent 341ec1179e
commit f5475d86e2
35 changed files with 1684 additions and 524 deletions

View File

@@ -0,0 +1,46 @@
"""
Integration test: install all configured repositories using
--clone-mode shallow (HTTPS shallow clone) and --no-verification.
This test is intended to be run inside the Docker container where:
- network access is available,
- the config/config.yaml is present,
- and it is safe to perform real git operations.
It passes if the command completes without raising an exception.
"""
import runpy
import sys
import unittest
class TestIntegrationInstallAllShallow(unittest.TestCase):
def test_install_all_repositories_shallow(self):
"""
Run: pkgmgr install --all --clone-mode shallow --no-verification
This will perform real installations/clones inside the container.
The test succeeds if no exception is raised.
"""
original_argv = sys.argv
try:
sys.argv = [
"pkgmgr",
"install",
"--all",
"--clone-mode",
"shallow",
"--no-verification",
]
# Execute main.py as if it was called from CLI.
# This will run the full install pipeline inside the container.
runpy.run_module("main", run_name="__main__")
finally:
sys.argv = original_argv
if __name__ == "__main__":
unittest.main()