]> arthur.barton.de Git - bup.git/blobdiff - test/ext/test-web
Teach pytest to handle WVSKIP and use it where we can
[bup.git] / test / ext / test-web
index dafd9cd568a23126b70dfc012cd3410ca9eb4023..7349890b9a235891a91d8d3c027023e1697a9cf9 100755 (executable)
@@ -27,21 +27,20 @@ wait-for-server-start()
 
 WVPASS cd "$tmpdir"
 
-# FIXME: add WVSKIP
 if test -z "$(type -p curl)"; then
-    WVSTART 'curl does not appear to be installed; skipping  test'
+    WVSKIP 'curl does not appear to be installed; skipping test'
     exit 0
 fi
     
 WVPASS bup-cfg-py -c "import socket as s; s.socket(s.AF_UNIX).bind('socket')"
 curl -s --unix-socket ./socket http://localhost/foo
 if test $? -ne 7; then
-    WVSTART 'curl does not appear to support --unix-socket; skipping test'
+    WVSKIP 'curl does not appear to support --unix-socket; skipping test'
     exit 0
 fi
 
 if ! bup-python -c 'import tornado' 2> /dev/null; then
-    WVSTART 'unable to import tornado; skipping test'
+    WVSKIP 'unable to import tornado; skipping test'
     exit 0
 fi
 
@@ -56,7 +55,7 @@ WVPASS bup save -n '¡excitement!' --strip src
 "$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
+trap 'cat bup-web.log' EXIT
 wait-for-server-start
 
 WVPASS curl --unix-socket ./socket \