summaryrefslogtreecommitdiff
path: root/src/tests/test-nsssd-switch.wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test-nsssd-switch.wrapper')
-rwxr-xr-xsrc/tests/test-nsssd-switch.wrapper21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/test-nsssd-switch.wrapper b/src/tests/test-nsssd-switch.wrapper
new file mode 100755
index 0000000..8e05937
--- /dev/null
+++ b/src/tests/test-nsssd-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-switch 0 ' ./nsssd-unix' '' > $F &
+wait $pid
+pid=$!
+rm -f $F
+trap cleanup TERM INT EXIT
+./test-nsssd-switch