about summary refs log tree commit diff
path: root/tests/install-package.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-09-21T18·54+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-09-21T18·54+0000
commit0bd5eb71a0a23b27a02af591ba46e4cf2c34aa04 (patch)
tree46e32a4eee45d30bcb2d5f780fe9ccd3bb41552d /tests/install-package.sh
parent4e91d8621f6620f8b15535002309882fd7794a1f (diff)
* `nix-install-package --url': install from a URL (NIX-12).
* `nix-install-package --help' (NIX-9).
* `nix-install-package --non-interactive': don't prompt or pause.
* Tests for nix-install-package.
* Security fixes: filter the values obtained from the nixpkg.

Diffstat (limited to 'tests/install-package.sh')
-rw-r--r--tests/install-package.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/install-package.sh b/tests/install-package.sh
new file mode 100644
index 0000000000..89d1d71f32
--- /dev/null
+++ b/tests/install-package.sh
@@ -0,0 +1,21 @@
+source common.sh
+
+# Note: this test expects to be run *after* nix-push.sh.
+
+drvPath=$($nixinstantiate ./dependencies.nix)
+outPath=$($nixstore -q $drvPath)
+
+clearStore
+clearProfiles
+
+cat > $TEST_ROOT/foo.nixpkg <<EOF
+NIXPKG1 file://$TEST_ROOT/manifest simple $system $drvPath $outPath
+EOF
+
+$NIX_BIN_DIR/nix-install-package --non-interactive -p $profiles/test $TEST_ROOT/foo.nixpkg
+test "$($nixenv -p $profiles/test -q '*' | wc -l)" -eq 1
+
+clearProfiles
+
+$NIX_BIN_DIR/nix-install-package --non-interactive -p $profiles/test --url file://$TEST_ROOT/foo.nixpkg
+test "$($nixenv -p $profiles/test -q '*' | wc -l)" -eq 1