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)
This commit is contained in:
Vladimír Čunát 2025-02-23 11:44:44 +01:00
parent 21577e033d
commit 72155225aa
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
2 changed files with 12 additions and 8 deletions

View file

@ -9,13 +9,15 @@ let
};
runTest =
module:
(evalTest (
{ config, ... }:
{
imports = [ module ];
result = config.test;
}
)).config.result;
# 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

View file

@ -36,7 +36,9 @@ in
};
platforms = lib.mkOption {
type = types.listOf types.raw;
default = lib.platforms.linux ++ lib.platforms.darwin;
# darwin could be added, but it would add VM tests that don't work on Hydra.nixos.org (so far)
# see https://github.com/NixOS/nixpkgs/pull/303597#issuecomment-2128782362
default = lib.platforms.linux;
description = ''
Sets the [`meta.platforms`](https://nixos.org/manual/nixpkgs/stable/#var-meta-platforms) attribute on the [{option}`test`](#test-opt-test) derivation.
'';