mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
shellcheck fix: tests/functional/gc-non-blocking.sh
This commit is contained in:
parent
2e5952fb6a
commit
52b9fb38e0
2 changed files with 8 additions and 7 deletions
|
|
@ -106,7 +106,6 @@
|
|||
enable = true;
|
||||
excludes = [
|
||||
# We haven't linted these files yet
|
||||
''^tests/functional/gc-non-blocking\.sh$''
|
||||
''^tests/functional/hash-convert\.sh$''
|
||||
''^tests/functional/impure-derivations\.sh$''
|
||||
''^tests/functional/impure-eval\.sh$''
|
||||
|
|
|
|||
|
|
@ -23,17 +23,17 @@ mkfifo "$fifo2"
|
|||
dummy=$(nix store add-path ./simple.nix)
|
||||
|
||||
running=$TEST_ROOT/running
|
||||
touch $running
|
||||
touch "$running"
|
||||
|
||||
# Start GC.
|
||||
(_NIX_TEST_GC_SYNC_1=$fifo1 _NIX_TEST_GC_SYNC_2=$fifo2 nix-store --gc -vvvvv; rm $running) &
|
||||
(_NIX_TEST_GC_SYNC_1=$fifo1 _NIX_TEST_GC_SYNC_2=$fifo2 nix-store --gc -vvvvv; rm "$running") &
|
||||
pid=$!
|
||||
|
||||
sleep 2
|
||||
|
||||
# Delay the start of the root server to check that the build below
|
||||
# correctly handles ENOENT when connecting to the root server.
|
||||
(sleep 1; echo > $fifo1) &
|
||||
(sleep 1; echo > "$fifo1") &
|
||||
pid2=$!
|
||||
|
||||
# Start a build. This should not be blocked by the GC in progress.
|
||||
|
|
@ -47,6 +47,8 @@ outPath=$(nix-build --max-silent-time 60 -o "$TEST_ROOT/result" -E "
|
|||
wait $pid
|
||||
wait $pid2
|
||||
|
||||
(! test -e $running)
|
||||
(! test -e $dummy)
|
||||
test -e $outPath
|
||||
# shellcheck disable=SC2235
|
||||
(! test -e "$running")
|
||||
# shellcheck disable=SC2235
|
||||
(! test -e "$dummy")
|
||||
test -e "$outPath"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue