Python (at least 3) behaves differently if somehow
stdio is connected to the terminal, and external
SIGTERM then doesn't cause the same behaviour as
actually pressing Ctrl-C. Redirect the output to
a file to make the test run standalone.
Print the file if any errors occur so that if there's
anything interesting in there, we can see it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
WVPASS bup index src
WVPASS bup save -n '¡excitement!' --strip src
-"$TOP/bup" web unix://socket &
+"$TOP/bup" web unix://socket </dev/null >bup-web.log 2>&1 &
web_pid=$!
+# output the log if something fails
+trap cat bup-web.log EXIT
wait-for-server-start
WVPASS curl --unix-socket ./socket \
WVPASS kill -s TERM "$web_pid"
WVPASS wait "$web_pid"
+trap - EXIT
WVPASS rm -r "$tmpdir"