From c183ee5c79dd356262c3d7c31e3aace09045671f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Mar 2009 14:48:42 +0000 Subject: * Acquire the locks on the output paths before trying to run the build hook. This fixes a problem with log files being partially or completely filled with 0's because another nix-store process truncates the log file. It should also be more efficient. --- tests/gc-concurrent.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/gc-concurrent.sh') diff --git a/tests/gc-concurrent.sh b/tests/gc-concurrent.sh index 8ae511e4facd..aee07bc57a57 100644 --- a/tests/gc-concurrent.sh +++ b/tests/gc-concurrent.sh @@ -1,6 +1,6 @@ source common.sh -$NIX_BIN_DIR/nix-collect-garbage -vvvvv +$NIX_BIN_DIR/nix-collect-garbage drvPath1=$($nixinstantiate gc-concurrent.nix -A test1) outPath1=$($nixstore -q $drvPath1) @@ -28,7 +28,7 @@ pid2=$! # Run the garbage collector while the build is running. sleep 4 -$NIX_BIN_DIR/nix-collect-garbage -vvvvv +$NIX_BIN_DIR/nix-collect-garbage # Wait for build #1/#2 to finish. echo waiting for pid $pid1 to finish... @@ -53,6 +53,6 @@ rm -f "$NIX_STATE_DIR"/gcroots/foo* ! test -e $outPath3.lock # If we run the collector now, it should delete outPath1/2. -$NIX_BIN_DIR/nix-collect-garbage -vvvvv +$NIX_BIN_DIR/nix-collect-garbage ! test -e $outPath1 ! test -e $outPath2 -- cgit 1.4.1