1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

shellcheck fix: tests/functional/gc-concurrent.builder.sh

This commit is contained in:
Farid Zakaria 2025-09-29 09:20:02 -07:00
parent 4192ca9131
commit 613bd67574
2 changed files with 7 additions and 5 deletions

View file

@ -106,7 +106,6 @@
enable = true; enable = true;
excludes = [ excludes = [
# We haven't linted these files yet # We haven't linted these files yet
''^tests/functional/gc-concurrent\.builder\.sh$''
''^tests/functional/gc-concurrent\.sh$'' ''^tests/functional/gc-concurrent\.sh$''
''^tests/functional/gc-concurrent2\.builder\.sh$'' ''^tests/functional/gc-concurrent2\.builder\.sh$''
''^tests/functional/gc-non-blocking\.sh$'' ''^tests/functional/gc-non-blocking\.sh$''

View file

@ -1,16 +1,19 @@
# shellcheck shell=bash
# shellcheck disable=SC2154
echo "Build started" > "$lockFifo" echo "Build started" > "$lockFifo"
mkdir $out # shellcheck disable=SC2154
echo $(cat $input1/foo)$(cat $input2/bar) > $out/foobar mkdir "$out"
echo "$(cat "$input1"/foo)""$(cat "$input2"/bar)" > "$out"/foobar
# Wait for someone to write on the fifo # Wait for someone to write on the fifo
cat "$lockFifo" cat "$lockFifo"
# $out should not have been GC'ed while we were sleeping, but just in # $out should not have been GC'ed while we were sleeping, but just in
# case... # case...
mkdir -p $out mkdir -p "$out"
# Check that the GC hasn't deleted the lock on our output. # Check that the GC hasn't deleted the lock on our output.
test -e "$out.lock" test -e "$out.lock"
ln -s $input2 $out/input-2 ln -s "$input2" "$out"/input-2