mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
Fix test hang when running under ninja
The psub tests create a fifo and launch a background job to write to it. However fifos have this obnoxious behavior where opening the file blocks until both sides are ready. In one of the tests we don't actually read from the fifo we create, so the background job hangs, and the tests never complete. Fix this by just reading from the fifo.
This commit is contained in:
parent
a2114233ac
commit
9907a8df4d
1 changed files with 4 additions and 0 deletions
|
@ -12,6 +12,10 @@ rm $filename
|
||||||
set -l filename (echo foo | psub --testing --fifo)
|
set -l filename (echo foo | psub --testing --fifo)
|
||||||
test -p $filename
|
test -p $filename
|
||||||
or echo 'psub is not a fifo' >&2
|
or echo 'psub is not a fifo' >&2
|
||||||
|
# hack: the background write that psub peforms may block
|
||||||
|
# until someone opens the fifo for reading. So make sure we
|
||||||
|
# actually read it.
|
||||||
|
cat $filename > /dev/null
|
||||||
rm $filename
|
rm $filename
|
||||||
|
|
||||||
cat (echo foo | psub)
|
cat (echo foo | psub)
|
||||||
|
|
Loading…
Reference in a new issue