diff options
-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 641e29d7e7a7..df3c9c6006c2 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 1d473ca0585e..ee0ddfbb69e6 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 000000000000..5530d7737689 --- /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 ] |