diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-09-04 13:30:11 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-09-04 13:30:11 +0200 |
commit | e302ba0e65ba875b7bafd6265285e5f06384b617 (patch) | |
tree | fe52d8a58f8f9bb3f57b8aee5b06aee52937c714 /tests/gc-auto.sh | |
parent | 2dbd69dbf4538d5b7947d192979ff4feab322c2e (diff) | |
parent | b774845af7a645b44bff69cf9f655c47fe4b9fb2 (diff) |
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'tests/gc-auto.sh')
-rw-r--r-- | tests/gc-auto.sh | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/tests/gc-auto.sh b/tests/gc-auto.sh index 06f5f0795..a74c675b0 100644 --- a/tests/gc-auto.sh +++ b/tests/gc-auto.sh @@ -17,42 +17,50 @@ expr=$(cat <<EOF with import ./config.nix; mkDerivation { name = "gc-A"; buildCommand = '' + set -x [[ \$(ls \$NIX_STORE/*-garbage? | wc -l) = 3 ]] mkdir \$out echo foo > \$out/bar echo 1... sleep 2 - echo 200 > $fake_free + echo 200 > ${fake_free}.tmp1 + mv ${fake_free}.tmp1 $fake_free echo 2... sleep 2 echo 3... + sleep 2 + echo 4... [[ \$(ls \$NIX_STORE/*-garbage? | wc -l) = 1 ]] ''; } EOF ) -nix build --impure -v -o $TEST_ROOT/result-A -L "($expr)" \ - --min-free 1000 --max-free 2000 --min-free-check-interval 1 & -pid=$! - expr2=$(cat <<EOF with import ./config.nix; mkDerivation { name = "gc-B"; buildCommand = '' + set -x mkdir \$out echo foo > \$out/bar echo 1... sleep 2 - echo 200 > $fake_free + echo 200 > ${fake_free}.tmp2 + mv ${fake_free}.tmp2 $fake_free echo 2... sleep 2 echo 3... + sleep 2 + echo 4... ''; } EOF ) +nix build --impure -v -o $TEST_ROOT/result-A -L "($expr)" \ + --min-free 1000 --max-free 2000 --min-free-check-interval 1 & +pid=$! + nix build --impure -v -o $TEST_ROOT/result-B -L "($expr2)" \ --min-free 1000 --max-free 2000 --min-free-check-interval 1 |