Add a test for nix-profile.sh
This commit is contained in:
parent
aac14222f5
commit
1bda006b74
3 changed files with 12 additions and 1 deletions
|
@ -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 =
|
||||
|
||||
|
|
|
@ -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
10
tests/nix-profile.sh
Normal 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 ]
|
Loading…
Reference in a new issue