1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 05:21:16 +02:00

Make the gc-concurrent test more reliable

Use a fifo pipe to handle the synchronisation between the different
threads rather than relying on delays
This commit is contained in:
regnat 2020-07-02 15:43:35 +02:00
parent 1b5aa60767
commit c762385457
4 changed files with 18 additions and 13 deletions

View file

@ -1,7 +1,10 @@
echo "Build started" > "$lockFifo"
mkdir $out
echo $(cat $input1/foo)$(cat $input2/bar) > $out/foobar
sleep 10
# Wait for someone to write on the fifo
cat "$lockFifo"
# $out should not have been GC'ed while we were sleeping, but just in
# case...