* Make check fixes.

This commit is contained in:
Eelco Dolstra 2005-02-01 17:50:48 +00:00
parent 65b6c8ab4c
commit c3981d81f6
5 changed files with 13 additions and 15 deletions

View file

@ -19,8 +19,8 @@ $binDir = "@bindir@" unless defined $binDir;
my $libexecDir = $ENV{"NIX_LIBEXEC_DIR"}; my $libexecDir = $ENV{"NIX_LIBEXEC_DIR"};
$libexecDir = "@libexecdir@" unless defined $libexecDir; $libexecDir = "@libexecdir@" unless defined $libexecDir;
my $localStateDir = $ENV{"NIX_LOCALSTATE_DIR"}; my $stateDir = $ENV{"NIX_STATE_DIR"};
$localStateDir = "@localstatedir@" unless defined $localStateDir; $stateDir = "@localstatedir@/nix" unless defined $stateDir;
# Obtain URLs either from the command line or from a configuration file. # Obtain URLs either from the command line or from a configuration file.
@ -49,7 +49,7 @@ sub processURL {
or die "cannot hash `$manifest'"; or die "cannot hash `$manifest'";
chomp $hash; chomp $hash;
my $finalPath = "$localStateDir/nix/manifests/$baseName-$hash.nixmanifest"; my $finalPath = "$stateDir/manifests/$baseName-$hash.nixmanifest";
system("mv '$manifest' '$finalPath'") == 0 system("mv '$manifest' '$finalPath'") == 0
or die "cannot move `$manifest' to `$finalPath"; or die "cannot move `$manifest' to `$finalPath";

View file

@ -5,12 +5,12 @@ extra1 = $(TEST_ROOT)/shared
TESTS_ENVIRONMENT = TEST_ROOT=$(TEST_ROOT) \ TESTS_ENVIRONMENT = TEST_ROOT=$(TEST_ROOT) \
NIX_STORE_DIR=$(TEST_ROOT)/store \ NIX_STORE_DIR=$(TEST_ROOT)/store \
NIX_DATA_DIR=$(TEST_ROOT)/data \ NIX_DATA_DIR=$(TEST_ROOT)/data \
NIX_LOG_DIR=$(TEST_ROOT)/log \ NIX_LOCALSTATE_DIR=$(TEST_ROOT)/var \
NIX_STATE_DIR=$(TEST_ROOT)/state \ NIX_LOG_DIR=$(TEST_ROOT)/var/log/nix \
NIX_STATE_DIR=$(TEST_ROOT)/var/nix \
NIX_DB_DIR=$(TEST_ROOT)/db \ NIX_DB_DIR=$(TEST_ROOT)/db \
NIX_BIN_DIR=$(TEST_ROOT)/bin \ NIX_BIN_DIR=$(TEST_ROOT)/bin \
NIX_LIBEXEC_DIR=$(TEST_ROOT)/bin \ NIX_LIBEXEC_DIR=$(TEST_ROOT)/bin \
NIX_LOCALSTATE_DIR=$(TEST_ROOT)/state \
REAL_BIN_DIR=$(bindir) \ REAL_BIN_DIR=$(bindir) \
REAL_LIBEXEC_DIR=$(libexecdir) \ REAL_LIBEXEC_DIR=$(libexecdir) \
REAL_LOCALSTATE_DIR=$(localstatedir) \ REAL_LOCALSTATE_DIR=$(localstatedir) \

View file

@ -4,9 +4,7 @@ outPath1=$($TOP/src/nix-store/nix-store -q $storeExpr1)
storeExpr2=$($TOP/src/nix-instantiate/nix-instantiate gc-concurrent2.nix) storeExpr2=$($TOP/src/nix-instantiate/nix-instantiate gc-concurrent2.nix)
outPath2=$($TOP/src/nix-store/nix-store -q $storeExpr2) outPath2=$($TOP/src/nix-store/nix-store -q $storeExpr2)
ls -l test-tmp/state/temproots ln -s $storeExpr2 "$NIX_STATE_DIR"/gcroots/foo2
ln -s $storeExpr2 "$NIX_LOCALSTATE_DIR"/nix/gcroots/foo2
# Start build #1 in the background. It starts immediately. # Start build #1 in the background. It starts immediately.
$TOP/src/nix-store/nix-store -rvv "$storeExpr1" & $TOP/src/nix-store/nix-store -rvv "$storeExpr1" &

View file

@ -2,7 +2,7 @@ storeExpr=$($TOP/src/nix-instantiate/nix-instantiate dependencies.nix)
outPath=$($TOP/src/nix-store/nix-store -rvv "$storeExpr") outPath=$($TOP/src/nix-store/nix-store -rvv "$storeExpr")
# Set a GC root. # Set a GC root.
ln -s $outPath "$NIX_LOCALSTATE_DIR"/nix/gcroots/foo ln -s $outPath "$NIX_STATE_DIR"/gcroots/foo
$NIX_BIN_DIR/nix-collect-garbage $NIX_BIN_DIR/nix-collect-garbage

View file

@ -9,7 +9,8 @@ mkdir "$TEST_ROOT"
mkdir "$NIX_STORE_DIR" mkdir "$NIX_STORE_DIR"
mkdir "$NIX_DATA_DIR" mkdir "$NIX_DATA_DIR"
mkdir "$NIX_LOG_DIR" mkdir "$NIX_LOCALSTATE_DIR"
mkdir -p "$NIX_LOG_DIR"
mkdir "$NIX_STATE_DIR" mkdir "$NIX_STATE_DIR"
mkdir "$NIX_DB_DIR" mkdir "$NIX_DB_DIR"
@ -23,10 +24,9 @@ mkdir $NIX_BIN_DIR/nix
ln -s $TOP/scripts/download-using-manifests.pl $NIX_BIN_DIR/nix/ ln -s $TOP/scripts/download-using-manifests.pl $NIX_BIN_DIR/nix/
ln -s $TOP/scripts/readmanifest.pm $NIX_BIN_DIR/nix/ ln -s $TOP/scripts/readmanifest.pm $NIX_BIN_DIR/nix/
mkdir -p "$NIX_LOCALSTATE_DIR"/nix/manifests mkdir -p "$NIX_STATE_DIR"/manifests
mkdir -p "$NIX_LOCALSTATE_DIR"/nix/gcroots mkdir -p "$NIX_STATE_DIR"/gcroots
mkdir -p "$NIX_LOCALSTATE_DIR"/log/nix mkdir -p "$NIX_STATE_DIR"/temproots
mkdir -p "$NIX_LOCALSTATE_DIR"/temproots
mkdir $NIX_DATA_DIR/nix mkdir $NIX_DATA_DIR/nix
cp -prd $TOP/corepkgs $NIX_DATA_DIR/nix/ cp -prd $TOP/corepkgs $NIX_DATA_DIR/nix/