mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-08 10:48:06 +09:00
lixPackageSets.*.lix: test the correct Lix in passthru.tests
Previously always the top-level lix package would be used, which is obviously not what we want.
This commit is contained in:
parent
32be3c655c
commit
9685bc5a05
3 changed files with 18 additions and 19 deletions
|
@ -632,6 +632,7 @@ let
|
|||
grubUseEfi ? false,
|
||||
enableOCR ? false,
|
||||
meta ? { },
|
||||
passthru ? { },
|
||||
testSpecialisationConfig ? false,
|
||||
testFlakeSwitch ? false,
|
||||
testByAttrSwitch ? false,
|
||||
|
@ -644,7 +645,7 @@ let
|
|||
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
|
||||
in
|
||||
makeTest {
|
||||
inherit enableOCR;
|
||||
inherit enableOCR passthru;
|
||||
name = "installer-" + name;
|
||||
meta = {
|
||||
# put global maintainers here, individuals go into makeInstallerTest fkt call
|
||||
|
@ -1109,10 +1110,12 @@ in
|
|||
|
||||
# The (almost) simplest partitioning scheme: a swap partition and
|
||||
# one big filesystem partition.
|
||||
simple = makeInstallerTest "simple" simple-test-config;
|
||||
lix-simple = makeInstallerTest "simple" simple-test-config // {
|
||||
selectNixPackage = pkgs: pkgs.lix;
|
||||
};
|
||||
simple = makeInstallerTest "simple" (
|
||||
simple-test-config
|
||||
// {
|
||||
passthru.override = args: makeInstallerTest "simple" simple-test-config // args;
|
||||
}
|
||||
);
|
||||
|
||||
switchToFlake = makeInstallerTest "switch-to-flake" simple-test-config-flake;
|
||||
|
||||
|
|
|
@ -3,20 +3,16 @@
|
|||
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
tests = {
|
||||
default = testsForPackage { nixPackage = pkgs.nix; };
|
||||
lix = testsForPackage { nixPackage = pkgs.lix; };
|
||||
};
|
||||
tests.default = testsForPackage { nixPackage = pkgs.nix; };
|
||||
|
||||
testsForPackage =
|
||||
args:
|
||||
lib.recurseIntoAttrs {
|
||||
# If the attribute is not named 'test'
|
||||
# You will break all the universe on the release-*.nix side of things.
|
||||
# `discoverTests` relies on `test` existence to perform a `callTest`.
|
||||
test = testMiscFeatures args;
|
||||
passthru.override = args': testsForPackage (args // args');
|
||||
testsForPackage = args: {
|
||||
# If the attribute is not named 'test'
|
||||
# You will break all the universe on the release-*.nix side of things.
|
||||
# `discoverTests` relies on `test` existence to perform a `callTest`.
|
||||
test = testMiscFeatures args // {
|
||||
passthru.override = args': (testsForPackage (args // args')).test;
|
||||
};
|
||||
};
|
||||
|
||||
testMiscFeatures =
|
||||
{ nixPackage, ... }:
|
||||
|
|
|
@ -347,8 +347,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru = {
|
||||
inherit aws-sdk-cpp boehmgc;
|
||||
tests = {
|
||||
misc = nixosTests.nix-misc.lix;
|
||||
installer = nixosTests.installer.lix-simple;
|
||||
misc = nixosTests.nix-misc.default.passthru.override { nixPackage = finalAttrs.finalPackage; };
|
||||
installer = nixosTests.installer.simple.override { selectNixPackage = _: finalAttrs.finalPackage; };
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue