From 0bd5eb71a0a23b27a02af591ba46e4cf2c34aa04 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 21 Sep 2006 18:54:08 +0000 Subject: * `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. --- tests/common.sh.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/common.sh.in') diff --git a/tests/common.sh.in b/tests/common.sh.in index 12162649e4b2..ca4c62d91493 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -47,3 +47,18 @@ export nixhash=$TOP/src/nix-hash/nix-hash readLink() { ls -l "$1" | sed 's/.*->\ //' } + +clearStore() { + echo "clearing store..." + chmod -R +w "$NIX_STORE_DIR" + rm -rf "$NIX_STORE_DIR" + mkdir "$NIX_STORE_DIR" + rm -rf "$NIX_DB_DIR" + mkdir "$NIX_DB_DIR" + $nixstore --init +} + +clearProfiles() { + profiles="$NIX_STATE_DIR"/profiles + rm -f $profiles/* +} -- cgit 1.4.1