diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-09-13 17:58:14 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-09-13 17:58:14 -0400 |
commit | 1bda006b748ffec371096af56a8fbf7125658f71 (patch) | |
tree | d86b6c79883d48bbbdf27201007c5824d95145f3 | |
parent | aac14222f52b15c9f4eea90359e9df09fb301739 (diff) |
Add a test for nix-profile.sh
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/common.sh.in | 1 | ||||
-rw-r--r-- | tests/nix-profile.sh | 10 |
3 files changed, 12 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 641e29d7e..df3c9c600 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 = diff --git a/tests/common.sh.in b/tests/common.sh.in index 1d473ca05..ee0ddfbb6 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -1,6 +1,7 @@ set -e datadir="@datadir@" +sysconfdir="@sysconfdir@" export TEST_ROOT=$(pwd)/test-tmp export NIX_STORE_DIR diff --git a/tests/nix-profile.sh b/tests/nix-profile.sh new file mode 100644 index 000000000..5530d7737 --- /dev/null +++ b/tests/nix-profile.sh @@ -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 ] |