Refactor hydraJobs.tests.remoteBuilds_*_2_18

This commit is contained in:
Robert Hensing 2024-06-03 17:26:16 +02:00
parent 6558025e77
commit efc2508e8b

View file

@ -37,6 +37,21 @@ let
(lib.strings.escapeRegex "nix-${pkgs.nix.version}") (lib.strings.escapeRegex "nix-${pkgs.nix.version}")
]; ];
}; };
otherNixes.nix_2_3.setNixPackage = { lib, pkgs, ... }: {
imports = [ checkOverrideNixVersion ];
nix.package = lib.mkForce pkgs.nixVersions.nix_2_3;
};
otherNixes.nix_2_13.setNixPackage = { lib, pkgs, ... }: {
imports = [ checkOverrideNixVersion ];
nix.package = lib.mkForce (
self.inputs.nixpkgs-23-11.legacyPackages.${pkgs.stdenv.hostPlatform.system}.nixVersions.nix_2_13.overrideAttrs (o: {
meta = o.meta // { knownVulnerabilities = []; };
})
);
};
in in
{ {
@ -44,108 +59,48 @@ in
remoteBuilds = runNixOSTestFor "x86_64-linux" ./remote-builds.nix; remoteBuilds = runNixOSTestFor "x86_64-linux" ./remote-builds.nix;
# Test our Nix as a client against remotes that are older
remoteBuilds_remote_2_3 = runNixOSTestFor "x86_64-linux" {
name = "remoteBuilds_remote_2_3";
imports = [ ./remote-builds.nix ];
builders.config = { lib, pkgs, ... }: {
imports = [ checkOverrideNixVersion ];
nix.package = lib.mkForce pkgs.nixVersions.nix_2_3;
};
};
remoteBuilds_remote_2_13 = runNixOSTestFor "x86_64-linux" ({ lib, pkgs, ... }: {
name = "remoteBuilds_remote_2_13";
imports = [ ./remote-builds.nix ];
builders.config = { lib, pkgs, ... }: {
imports = [ checkOverrideNixVersion ];
nix.package = lib.mkForce (
self.inputs.nixpkgs-23-11.legacyPackages.${pkgs.stdenv.hostPlatform.system}.nixVersions.nix_2_13.overrideAttrs (o: {
meta = o.meta // { knownVulnerabilities = []; };
})
);
};
});
# TODO: (nixpkgs update) remoteBuilds_remote_2_18 = ...
# Test our Nix as a builder for clients that are older
remoteBuilds_local_2_3 = runNixOSTestFor "x86_64-linux" ({ lib, pkgs, ... }: {
name = "remoteBuilds_local_2_3";
imports = [ ./remote-builds.nix ];
nodes.client = { lib, pkgs, ... }: {
imports = [ checkOverrideNixVersion ];
nix.package = lib.mkForce pkgs.nixVersions.nix_2_3;
};
});
remoteBuilds_local_2_13 = runNixOSTestFor "x86_64-linux" ({ lib, pkgs, ... }: {
name = "remoteBuilds_local_2_13";
imports = [ ./remote-builds.nix ];
nodes.client = { lib, pkgs, ... }: {
imports = [ checkOverrideNixVersion ];
nix.package = lib.mkForce (
self.inputs.nixpkgs-23-11.legacyPackages.${pkgs.stdenv.hostPlatform.system}.nixVersions.nix_2_13.overrideAttrs (o: {
meta = o.meta // { knownVulnerabilities = []; };
})
);
};
});
# TODO: (nixpkgs update) remoteBuilds_local_2_18 = ...
# End remoteBuilds tests
remoteBuildsSshNg = runNixOSTestFor "x86_64-linux" ./remote-builds-ssh-ng.nix; remoteBuildsSshNg = runNixOSTestFor "x86_64-linux" ./remote-builds-ssh-ng.nix;
# Test our Nix as a client against remotes that are older }
// lib.concatMapAttrs (
remoteBuildsSshNg_remote_2_3 = runNixOSTestFor "x86_64-linux" { nixVersion: { setNixPackage, ... }:
name = "remoteBuildsSshNg_remote_2_3"; {
imports = [ ./remote-builds-ssh-ng.nix ]; "remoteBuilds_remote_${nixVersion}" = runNixOSTestFor "x86_64-linux" {
builders.config = { lib, pkgs, ... }: { name = "remoteBuilds_remote_${nixVersion}";
imports = [ checkOverrideNixVersion ]; imports = [ ./remote-builds.nix ];
nix.package = lib.mkForce pkgs.nixVersions.nix_2_3; builders.config = { lib, pkgs, ... }: {
imports = [ setNixPackage ];
};
}; };
};
remoteBuildsSshNg_remote_2_13 = runNixOSTestFor "x86_64-linux" { "remoteBuilds_local_${nixVersion}" = runNixOSTestFor "x86_64-linux" {
name = "remoteBuildsSshNg_remote_2_13"; name = "remoteBuilds_local_${nixVersion}";
imports = [ ./remote-builds-ssh-ng.nix ]; imports = [ ./remote-builds.nix ];
builders.config = { lib, pkgs, ... }: { nodes.client = { lib, pkgs, ... }: {
imports = [ checkOverrideNixVersion ]; imports = [ setNixPackage ];
nix.package = lib.mkForce pkgs.nixVersions.nix_2_13; };
}; };
};
# TODO: (nixpkgs update) remoteBuildsSshNg_remote_2_18 = ... "remoteBuildsSshNg_remote_${nixVersion}" = runNixOSTestFor "x86_64-linux" {
name = "remoteBuildsSshNg_remote_${nixVersion}";
# Test our Nix as a builder for clients that are older imports = [ ./remote-builds-ssh-ng.nix ];
builders.config = { lib, pkgs, ... }: {
# FIXME: these tests don't work yet imports = [ setNixPackage ];
/* };
remoteBuildsSshNg_local_2_3 = runNixOSTestFor "x86_64-linux" ({ lib, pkgs, ... }: {
name = "remoteBuildsSshNg_local_2_3";
imports = [ ./remote-builds-ssh-ng.nix ];
nodes.client = { lib, pkgs, ... }: {
imports = [ checkOverrideNixVersion ];
nix.package = lib.mkForce pkgs.nixVersions.nix_2_3;
}; };
});
remoteBuildsSshNg_local_2_13 = runNixOSTestFor "x86_64-linux" ({ lib, pkgs, ... }: { # FIXME: these tests don't work yet
name = "remoteBuildsSshNg_local_2_13";
imports = [ ./remote-builds-ssh-ng.nix ];
nodes.client = { lib, pkgs, ... }: {
imports = [ checkOverrideNixVersion ];
nix.package = lib.mkForce pkgs.nixVersions.nix_2_13;
};
});
# TODO: (nixpkgs update) remoteBuildsSshNg_local_2_18 = ... # "remoteBuildsSshNg_local_${nixVersion}" = runNixOSTestFor "x86_64-linux" {
*/ # name = "remoteBuildsSshNg_local_${nixVersion}";
# imports = [ ./remote-builds-ssh-ng.nix ];
# nodes.client = { lib, pkgs, ... }: {
# imports = [ overridingModule ];
# };
# };
}
) otherNixes
// {
nix-copy-closure = runNixOSTestFor "x86_64-linux" ./nix-copy-closure.nix; nix-copy-closure = runNixOSTestFor "x86_64-linux" ./nix-copy-closure.nix;