2 . wvtest-bup.sh || exit $?
7 TOP="$(WVPASS pwd)" || exit $?
8 tmpdir="$(WVPASS wvmktempdir)" || exit $?
9 export BUP_DIR="$tmpdir/bup"
16 wait-for-server-start()
18 curl --unix-socket ./socket http://localhost/
20 while test $curl_status -eq 7; do
22 curl --unix-socket ./socket http://localhost/
25 WVPASSEQ $curl_status 0
33 if test -z "$(type -p curl)"; then
34 WVSTART 'curl does not appear to be installed; skipping test'
38 WVPASS bup-python -c "import socket as s; s.socket(s.AF_UNIX).bind('socket')"
39 curl -s --unix-socket ./socket http://localhost/foo
40 if test $? -ne 7; then
41 WVSTART 'curl does not appear to support --unix-socket; skipping test'
45 if ! bup-python -c 'import tornado' 2> /dev/null; then
46 WVSTART 'unable to import tornado; skipping test'
50 if test -n "$run_test"; then
54 WVPASS echo '¡excitement!' > src/data
56 WVPASS bup save -n '¡excitement!' --strip src
58 "$TOP/bup" web unix://socket &
62 WVPASS curl --unix-socket ./socket \
63 'http://localhost/%C2%A1excitement%21/latest/data' > result
65 WVPASSEQ '¡excitement!' "$(cat result)"
66 WVPASS kill -s TERM "$web_pid"
67 WVPASS wait "$web_pid"
70 WVPASS rm -r "$tmpdir"