mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43: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
|
||||
{ lib, pkgs }:
|
||||
|
||||
with lib;
|
||||
with kernel;
|
||||
|
||||
let
|
||||
lts_kernel = pkgs.linuxPackages.kernel;
|
||||
|
||||
@ -14,29 +11,29 @@ let
|
||||
structuredExtraConfig = structuredConfig;
|
||||
}).configfile.structuredConfig;
|
||||
|
||||
mandatoryVsOptionalConfig = mkMerge [
|
||||
{ NIXOS_FAKE_USB_DEBUG = yes;}
|
||||
{ NIXOS_FAKE_USB_DEBUG = option yes; }
|
||||
mandatoryVsOptionalConfig = lib.mkMerge [
|
||||
{ NIXOS_FAKE_USB_DEBUG = lib.kernel.yes;}
|
||||
{ NIXOS_FAKE_USB_DEBUG = lib.kernel.option lib.kernel.yes; }
|
||||
];
|
||||
|
||||
freeformConfig = mkMerge [
|
||||
{ NIXOS_FAKE_MMC_BLOCK_MINORS = 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:
|
||||
freeformConfig = lib.mkMerge [
|
||||
{ NIXOS_FAKE_MMC_BLOCK_MINORS = lib.kernel.freeform "32"; } # same as default, won't trigger any error
|
||||
{ NIXOS_FAKE_MMC_BLOCK_MINORS = lib.kernel.freeform "64"; } # will trigger an error but the message is not great:
|
||||
];
|
||||
|
||||
mkDefaultWorksConfig = mkMerge [
|
||||
{ "NIXOS_TEST_BOOLEAN" = yes; }
|
||||
{ "NIXOS_TEST_BOOLEAN" = lib.mkDefault no; }
|
||||
mkDefaultWorksConfig = lib.mkMerge [
|
||||
{ "NIXOS_TEST_BOOLEAN" = lib.kernel.yes; }
|
||||
{ "NIXOS_TEST_BOOLEAN" = lib.mkDefault lib.kernel.no; }
|
||||
];
|
||||
|
||||
allOptionalRemainOptional = mkMerge [
|
||||
{ NIXOS_FAKE_USB_DEBUG = option yes;}
|
||||
{ NIXOS_FAKE_USB_DEBUG = option yes;}
|
||||
allOptionalRemainOptional = lib.mkMerge [
|
||||
{ NIXOS_FAKE_USB_DEBUG = lib.kernel.option lib.kernel.yes;}
|
||||
{ NIXOS_FAKE_USB_DEBUG = lib.kernel.option lib.kernel.yes;}
|
||||
];
|
||||
|
||||
failures = runTests {
|
||||
failures = lib.runTests {
|
||||
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; };
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user