Add a test for nix-profile.sh

This commit is contained in:
Eelco Dolstra 2012-09-13 17:58:14 -04:00
parent aac14222f5
commit 1bda006b74
3 changed files with 12 additions and 1 deletions

View file

@ -10,7 +10,7 @@ TESTS = init.sh hash.sh lang.sh add.sh simple.sh dependencies.sh \
remote-store.sh export.sh export-graph.sh negative-caching.sh \
binary-patching.sh timeout.sh secure-drv-outputs.sh nix-channel.sh \
multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh \
binary-cache.sh
binary-cache.sh nix-profile.sh
XFAIL_TESTS =

View file

@ -1,6 +1,7 @@
set -e
datadir="@datadir@"
sysconfdir="@sysconfdir@"
export TEST_ROOT=$(pwd)/test-tmp
export NIX_STORE_DIR

10
tests/nix-profile.sh Normal file
View file

@ -0,0 +1,10 @@
source common.sh
home=$TEST_ROOT/home
rm -rf $home
mkdir -p $home
HOME=$home $SHELL -e -c ". $sysconfdir/profile.d/nix.sh"
HOME=$home $SHELL -e -c ". $sysconfdir/profile.d/nix.sh" # test idempotency
[ -e $home/.nix-profile ]
[ -e $home/.nix-channels ]