1
0
Fork 1
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:
Alois Wohlschlager 2025-05-10 11:06:47 +02:00 committed by Yureka
parent 32be3c655c
commit 9685bc5a05
3 changed files with 18 additions and 19 deletions

View file

@ -632,6 +632,7 @@ let
grubUseEfi ? false, grubUseEfi ? false,
enableOCR ? false, enableOCR ? false,
meta ? { }, meta ? { },
passthru ? { },
testSpecialisationConfig ? false, testSpecialisationConfig ? false,
testFlakeSwitch ? false, testFlakeSwitch ? false,
testByAttrSwitch ? false, testByAttrSwitch ? false,
@ -644,7 +645,7 @@ let
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi); isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
in in
makeTest { makeTest {
inherit enableOCR; inherit enableOCR passthru;
name = "installer-" + name; name = "installer-" + name;
meta = { meta = {
# put global maintainers here, individuals go into makeInstallerTest fkt call # put global maintainers here, individuals go into makeInstallerTest fkt call
@ -1109,10 +1110,12 @@ in
# The (almost) simplest partitioning scheme: a swap partition and # The (almost) simplest partitioning scheme: a swap partition and
# one big filesystem partition. # one big filesystem partition.
simple = makeInstallerTest "simple" simple-test-config; simple = makeInstallerTest "simple" (
lix-simple = makeInstallerTest "simple" simple-test-config // { simple-test-config
selectNixPackage = pkgs: pkgs.lix; // {
}; passthru.override = args: makeInstallerTest "simple" simple-test-config // args;
}
);
switchToFlake = makeInstallerTest "switch-to-flake" simple-test-config-flake; switchToFlake = makeInstallerTest "switch-to-flake" simple-test-config-flake;

View file

@ -3,19 +3,15 @@
let let
inherit (pkgs) lib; inherit (pkgs) lib;
tests = { tests.default = testsForPackage { nixPackage = pkgs.nix; };
default = testsForPackage { nixPackage = pkgs.nix; };
lix = testsForPackage { nixPackage = pkgs.lix; };
};
testsForPackage = testsForPackage = args: {
args:
lib.recurseIntoAttrs {
# If the attribute is not named 'test' # If the attribute is not named 'test'
# You will break all the universe on the release-*.nix side of things. # You will break all the universe on the release-*.nix side of things.
# `discoverTests` relies on `test` existence to perform a `callTest`. # `discoverTests` relies on `test` existence to perform a `callTest`.
test = testMiscFeatures args; test = testMiscFeatures args // {
passthru.override = args': testsForPackage (args // args'); passthru.override = args': (testsForPackage (args // args')).test;
};
}; };
testMiscFeatures = testMiscFeatures =

View file

@ -347,8 +347,8 @@ stdenv.mkDerivation (finalAttrs: {
passthru = { passthru = {
inherit aws-sdk-cpp boehmgc; inherit aws-sdk-cpp boehmgc;
tests = { tests = {
misc = nixosTests.nix-misc.lix; misc = nixosTests.nix-misc.default.passthru.override { nixPackage = finalAttrs.finalPackage; };
installer = nixosTests.installer.lix-simple; installer = nixosTests.installer.simple.override { selectNixPackage = _: finalAttrs.finalPackage; };
}; };
}; };