1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-15 05:21:03 +01:00

Add simple test for nix upgrade-nix

(cherry picked from commit 264e66f696)
This commit is contained in:
Eelco Dolstra 2018-08-30 17:10:28 +02:00
parent 8b0761b172
commit d7b2c6c92f
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 20 additions and 1 deletions

View file

@ -249,6 +249,18 @@ let
su - alice -c '_NIX_INSTALLER_TEST=1 ./nix-*/install'
su - alice -c 'nix-store --verify'
su - alice -c 'PAGER= nix-store -qR ${build.x86_64-linux}'
# Check whether 'nix upgrade-nix' works.
(! [ -L /nix/var/nix/profiles/per-user/alice/profile-2-link ])
cat > /tmp/paths.nix <<EOF
{
x86_64-linux = "${build.x86_64-linux}";
}
EOF
su - alice -c 'nix upgrade-nix -vvv --nix-store-paths-url file:///tmp/paths.nix'
[ -L /nix/var/nix/profiles/per-user/alice/profile-2-link ]
su - alice -c 'PAGER= nix-store -qR ${build.x86_64-linux}'
mkdir -p $out/nix-support
touch $out/nix-support/hydra-build-products
umount /nix