nixpkgs/nixos/lib/testing/default.nix
Vladimír Čunát 72155225aa
nixos/lib/testing: avoid generating darwin VM tests
We're getting 2x5 darwin VM jobs that aren't schedulable
on our current Hydra.nixos.org, which makes them hang around
and delay advancing of all `nixpkgs-*` channels.
To me that's quite an annoying effect, as it can be like an extra day
of additional delay without any benefit that I can really perceive.
(unless someone like me keeps manually cancelling the jobs all the time)
2025-03-29 19:32:31 +01:00

39 lines
708 B
Nix

{ lib }:
let
evalTest =
module:
lib.evalModules {
modules = testModules ++ [ module ];
class = "nixosTest";
};
runTest =
module:
# Infra issue: virtualization on darwin doesn't seem to work yet.
lib.addMetaAttrs { hydraPlatforms = lib.platforms.linux; }
(evalTest (
{ config, ... }:
{
imports = [ module ];
result = config.test;
}
)).config.result;
testModules = [
./call-test.nix
./driver.nix
./interactive.nix
./legacy.nix
./meta.nix
./name.nix
./network.nix
./nodes.nix
./pkgs.nix
./run.nix
./testScript.nix
];
in
{
inherit evalTest runTest testModules;
}