Refactor NixOS test wiring and improve eval efficiency #55798
Labels
0.kind: enhancement
Add something new
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
6.topic: nixos
Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
6.topic: testing
Tooling for automated testing of packages and modules
Issue description
Actionable item from #50301
NixOS could reuse
pkgs
inpkgs.nixosTest
to achieve an evaluation speedup. I also think we should have some tests that exercise the 'normal'modules/misc/nixpkgs.nix
functionality, so perhapsall-tests.nix
should then have access to two runners: an efficient one and a 'standalone' one.Excerpt from Ekleog comment:
The objective is:
nix-build nixos/tests/foo.nix
, then it'll default to importing../..
.nix-build nixos/release.nix -A tests.foo
, then it'll default to, innixos/release.nix
, importing./..
and using it intests.foo
(and using the same import for all tests if you-A tests
, even though that's likely to fail because lots of tests are broken).nix-build -E '(import <nixpkgs> { overlays = [ ./overlay.nix ]; }).foo.tests
, it'll defer tonixosTests.foo
(from the samenixpkgs
), which will call the test with the same overlay'dnixpkgs
.For the complete discussion, see #50301
The text was updated successfully, but these errors were encountered: