about summary refs log tree commit diff
path: root/release.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-08-30T15·10+0200
committerEelco Dolstra <edolstra@gmail.com>2018-08-30T15·10+0200
commit264e66f69699919f1040be2986b91fd6b188e9af (patch)
treef5a11f10c5c9975d50762f10c15a1871c4280af0 /release.nix
parent308689f94bf64514ee91acc8eed09e4a48b7730a (diff)
Add simple test for nix upgrade-nix
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/release.nix b/release.nix
index f9ee07e34781..fdf3fa946aa8 100644
--- a/release.nix
+++ b/release.nix
@@ -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