mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
tests.kernel-config: remove 'with lib;'
This commit is contained in:
parent
9b63020bc6
commit
1517dd9072
@ -2,9 +2,6 @@
|
|||||||
# common-config.nix
|
# common-config.nix
|
||||||
{ lib, pkgs }:
|
{ lib, pkgs }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
with kernel;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
lts_kernel = pkgs.linuxPackages.kernel;
|
lts_kernel = pkgs.linuxPackages.kernel;
|
||||||
|
|
||||||
@ -14,29 +11,29 @@ let
|
|||||||
structuredExtraConfig = structuredConfig;
|
structuredExtraConfig = structuredConfig;
|
||||||
}).configfile.structuredConfig;
|
}).configfile.structuredConfig;
|
||||||
|
|
||||||
mandatoryVsOptionalConfig = mkMerge [
|
mandatoryVsOptionalConfig = lib.mkMerge [
|
||||||
{ NIXOS_FAKE_USB_DEBUG = yes;}
|
{ NIXOS_FAKE_USB_DEBUG = lib.kernel.yes;}
|
||||||
{ NIXOS_FAKE_USB_DEBUG = option yes; }
|
{ NIXOS_FAKE_USB_DEBUG = lib.kernel.option lib.kernel.yes; }
|
||||||
];
|
];
|
||||||
|
|
||||||
freeformConfig = mkMerge [
|
freeformConfig = lib.mkMerge [
|
||||||
{ NIXOS_FAKE_MMC_BLOCK_MINORS = freeform "32"; } # same as default, won't trigger any error
|
{ NIXOS_FAKE_MMC_BLOCK_MINORS = lib.kernel.freeform "32"; } # same as default, won't trigger any error
|
||||||
{ NIXOS_FAKE_MMC_BLOCK_MINORS = freeform "64"; } # will trigger an error but the message is not great:
|
{ NIXOS_FAKE_MMC_BLOCK_MINORS = lib.kernel.freeform "64"; } # will trigger an error but the message is not great:
|
||||||
];
|
];
|
||||||
|
|
||||||
mkDefaultWorksConfig = mkMerge [
|
mkDefaultWorksConfig = lib.mkMerge [
|
||||||
{ "NIXOS_TEST_BOOLEAN" = yes; }
|
{ "NIXOS_TEST_BOOLEAN" = lib.kernel.yes; }
|
||||||
{ "NIXOS_TEST_BOOLEAN" = lib.mkDefault no; }
|
{ "NIXOS_TEST_BOOLEAN" = lib.mkDefault lib.kernel.no; }
|
||||||
];
|
];
|
||||||
|
|
||||||
allOptionalRemainOptional = mkMerge [
|
allOptionalRemainOptional = lib.mkMerge [
|
||||||
{ NIXOS_FAKE_USB_DEBUG = option yes;}
|
{ NIXOS_FAKE_USB_DEBUG = lib.kernel.option lib.kernel.yes;}
|
||||||
{ NIXOS_FAKE_USB_DEBUG = option yes;}
|
{ NIXOS_FAKE_USB_DEBUG = lib.kernel.option lib.kernel.yes;}
|
||||||
];
|
];
|
||||||
|
|
||||||
failures = runTests {
|
failures = lib.runTests {
|
||||||
testEasy = {
|
testEasy = {
|
||||||
expr = (getConfig { NIXOS_FAKE_USB_DEBUG = yes;}).NIXOS_FAKE_USB_DEBUG;
|
expr = (getConfig { NIXOS_FAKE_USB_DEBUG = lib.kernel.yes;}).NIXOS_FAKE_USB_DEBUG;
|
||||||
expected = { tristate = "y"; optional = false; freeform = null; };
|
expected = { tristate = "y"; optional = false; freeform = null; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user