summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Proulx <bob@proulx.com>2017-01-09 03:31:19 (GMT)
committerBob Proulx <bob@proulx.com>2017-01-09 03:31:19 (GMT)
commitc3a78bad4d17046b6692a1eec2e29caca362e6fa (patch)
tree88c831c3407d2ae7b586ffad3287c4c5c22bfc03
parent59b00718935b7664801ba912412a8732acfd1f93 (diff)
downloadsavannah-tests-c3a78bad4d17046b6692a1eec2e29caca362e6fa.zip
savannah-tests-c3a78bad4d17046b6692a1eec2e29caca362e6fa.tar.gz
savannah-tests-c3a78bad4d17046b6692a1eec2e29caca362e6fa.tar.bz2
Fix bzr web failure.
-rw-r--r--test/Makefile.am4
-rwxr-xr-xtest/bzr-web19
-rw-r--r--test/bzr-web-xfail67
3 files changed, 21 insertions, 69 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index fcd6fd2..02d2faf 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,9 +1,9 @@
TESTS = \
- bzr-bzr bzr-ssh bzr-web bzr-web-xfail bzr-rsync \
+ bzr-bzr bzr-ssh bzr-web bzr-rsync \
cvs-pserver cvs-ssh cvs-web cvs-rsync \
git-git git-ssh git-http git-https git-rsync \
svn-svn svn-ssh svn-http svn-https svn-rsync
-XFAIL_TESTS = bzr-web-xfail git-https
+XFAIL_TESTS = git-https
EXTRA_DIST = $(TESTS)
diff --git a/test/bzr-web b/test/bzr-web
index a18995c..3a3e6bb 100755
--- a/test/bzr-web
+++ b/test/bzr-web
@@ -56,4 +56,23 @@ for url in $list; do
testit "http:$url"
done
+testrobots() {
+ url=$1 ; shift
+ wget -Oout "$url"
+ fail=false
+ if [ $? -ne 0 ]; then
+ echo "Failed to web GET: $url"
+ fail=true
+ fi
+ test -s out || fail=true
+ grep ^User-agent: out || fail=true
+ grep ^Disallow: out || fail=true
+ rm -f out
+ test -s out && fail=true
+ $fail && exit 1
+}
+
+testrobots https://bzr.savannah.gnu.org/robots.txt
+testrobots http://bzr.savannah.gnu.org/robots.txt
+
exit 0
diff --git a/test/bzr-web-xfail b/test/bzr-web-xfail
deleted file mode 100644
index ee932f8..0000000
--- a/test/bzr-web-xfail
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-
-# Copyright 2017 Bob Proulx <bob@proulx.com>
-# You may freely use, modify and/or distribute this file.
-
-# Ensure a standard behavior regardless of caller locale setting.
-export LC_ALL=C
-
-unset tmpdir
-cleanup() {
- test -n "$tmpdir" && rm -rf "$tmpdir" && unset tmpdir
-}
-trap "cleanup" EXIT
-# Begin dash specific trap handling.
-trap "cleanup; trap - HUP; kill -HUP $$" HUP
-trap "cleanup; trap - INT; kill -INT $$" INT
-trap "cleanup; trap - QUIT; kill -QUIT $$" QUIT
-trap "cleanup; trap - TERM; kill -TERM $$" TERM
-# End dash specific trap handling.
-
-tmpdir=$(mktemp -d -t "sv-test.XXXXXXXX") || exit 1
-
-cd "$tmpdir" || exit 1
-
-testit() {
- url=$1 ; shift
- wget -Oout "$url"
- if [ $? -ne 0 ]; then
- echo "Failed to web GET: $url"
- exit 1
- fi
- test -s out || exit 1
- rm -f out
- test -s out && exit 1
-}
-
-testitxfail() {
- url=$1 ; shift
- wget -Oout "$url"
- if [ $? -eq 0 ]; then
- echo "Worked to web GET: $url"
- exit 1
- fi
- test -s out && exit 1
- echo "XFAIL: $url"
-}
-
-testrobotsxfail() {
- url=$1 ; shift
- wget -Oout "$url"
- fail=false
- if [ $? -ne 0 ]; then
- echo "Failed to web GET: $url"
- fail=true
- fi
- test -s out || fail=true
- grep ^User-agent: out || fail=true
- grep ^Disallow: out || fail=true
- rm -f out
- test -s out && fail=true
- $fail || exit 1
-}
-
-testrobotsxfail https://bzr.savannah.gnu.org/robots.txt
-testrobotsxfail http://bzr.savannah.gnu.org/robots.txt
-
-exit 0