diff options
Diffstat (limited to 'src/tests/test-switch.wrapper')
-rwxr-xr-x | src/tests/test-switch.wrapper | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/test-switch.wrapper b/src/tests/test-switch.wrapper new file mode 100755 index 0000000..5117400 --- /dev/null +++ b/src/tests/test-switch.wrapper @@ -0,0 +1,21 @@ +#!/bin/sh -e + +S=./.test-switch-socket +F=./.test-switch-fifo + +pid=0 + +cleanup () { + kill $pid + rm -f $S +} + +mkfifo $F +head -n 1 < $F >/dev/null & +pid=$! +s6-ipcserver -1 -- $S ./nsssd-unix > $F & +wait $pid +pid=$! +rm -f $F +trap cleanup TERM INT EXIT +./test-switch |