nixos/release: respect meta.hydraPlatforms from NixOS tests

E.g. nspawn tests are not supported on the official NixOS infrastructure
currently.
This commit is contained in:
Maximilian Bosch
2026-03-26 14:12:23 +01:00
parent 924ddc5508
commit 2bf826c902
+22 -12
View File
@@ -43,12 +43,17 @@ let
pkgs = import ./.. { inherit system; };
callTest =
config:
if attrNamesOnly then
hydraJob config.test
else
{
${system} = hydraJob config.test;
};
let
inherit (config) test;
in
lib.optionalAttrs (builtins.elem system (getPlatforms test)) (
if attrNamesOnly then
hydraJob test
else
{
${system} = hydraJob test;
}
);
}
// {
# for typechecking of the scripts and evaluation of
@@ -58,12 +63,17 @@ let
pkgs = import ./.. { inherit system; };
callTest =
config:
if attrNamesOnly then
hydraJob config.driver
else
{
${system} = hydraJob config.driver;
};
let
inherit (config) driver;
in
lib.optionalAttrs (builtins.elem system (getPlatforms driver)) (
if attrNamesOnly then
hydraJob driver
else
{
${system} = hydraJob driver;
}
);
};
};