3
0
Fork 0
forked from mirrors/nixpkgs

nixos/testing: fix eval for tests created without make-python-test.nix

We have too many test entrypoints and this is a problem.
This commit is contained in:
K900 2023-10-06 23:52:04 +03:00
parent bd1cf55f63
commit 80cc25eb51

View file

@ -30,13 +30,15 @@ let
})
({ options, ... }: {
key = "nodes.nix-pkgs";
config = mkIf (!options.nixpkgs.pkgs.isDefined) {
# Ensure we do not use aliases. Ideally this is only set
# when the test framework is used by Nixpkgs NixOS tests.
nixpkgs.config.allowAliases = false;
# TODO: switch to nixpkgs.hostPlatform and make sure containers-imperative test still evaluates.
nixpkgs.system = hostPkgs.stdenv.hostPlatform.system;
};
config = optionalAttrs (!config.node.pkgsReadOnly) (
mkIf (!options.nixpkgs.pkgs.isDefined) {
# Ensure we do not use aliases. Ideally this is only set
# when the test framework is used by Nixpkgs NixOS tests.
nixpkgs.config.allowAliases = false;
# TODO: switch to nixpkgs.hostPlatform and make sure containers-imperative test still evaluates.
nixpkgs.system = hostPkgs.stdenv.hostPlatform.system;
}
);
})
testModuleArgs.config.extraBaseModules
];