1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 13:06:01 +01:00

Add self-version daemon test

This is not a cherry-pick because enough reworking had to happen.
This commit is contained in:
John Ericson 2025-02-14 00:57:56 -05:00
parent 67ab776e15
commit e813f9c4cd

View file

@ -223,8 +223,41 @@ let
FONTCONFIG_FILE = texFunctions.fontsConf;
};
testNixVersions = client: daemon: pkgs:
with import ./release-common.nix { inherit pkgs; };
pkgs.releaseTools.nixBuild {
NIX_DAEMON_PACKAGE = daemon;
NIX_CLIENT_PACKAGE = client;
name = "nix-tests-${client.src.version}-against-${daemon.src.version}";
src = tarball;
VERSION_SUFFIX = tarball.versionSuffix;
buildInputs = buildDeps;
propagatedBuildInputs = propagatedDeps;
enableParallelBuilding = true;
dontBuild = true;
doInstallCheck = true;
installPhase = ''
mkdir -p $out
'';
installCheckPhase = "make installcheck";
};
testAgainstSelf = pkgs.lib.genAttrs systems (system:
let pkgs = import nixpkgs { inherit system; }; in
testNixVersions build.${system} build.${system} pkgs);
# System tests.
tests.remoteBuilds = (import ./tests/remote-builds.nix rec {
inherit nixpkgs;
nix = build.x86_64-linux; system = "x86_64-linux";