summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Proulx <bob@proulx.com>2017-01-09 02:33:02 (GMT)
committerBob Proulx <bob@proulx.com>2017-01-09 02:38:38 (GMT)
commit40b587531d5819bfa1336502aec26a69a7c45c00 (patch)
treeaf87572d9a043ab422c733ae9440a2572ce33c1a
parent2425616628c1b9de25a7dc892a41c53c6a74b0dc (diff)
downloadsavannah-tests-40b587531d5819bfa1336502aec26a69a7c45c00.zip
savannah-tests-40b587531d5819bfa1336502aec26a69a7c45c00.tar.gz
savannah-tests-40b587531d5819bfa1336502aec26a69a7c45c00.tar.bz2
Update xfail tests.
-rw-r--r--test/bzr-web-xfail20
-rwxr-xr-xtest/git-http36
2 files changed, 53 insertions, 3 deletions
diff --git a/test/bzr-web-xfail b/test/bzr-web-xfail
index 4be5af3..ee932f8 100644
--- a/test/bzr-web-xfail
+++ b/test/bzr-web-xfail
@@ -45,7 +45,23 @@ testitxfail() {
echo "XFAIL: $url"
}
-testitxfail https://bzr.savannah.gnu.org/robots.txt
-testitxfail http://bzr.savannah.gnu.org/robots.txt
+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
diff --git a/test/git-http b/test/git-http
index 8af5a7f..cfff16a 100755
--- a/test/git-http
+++ b/test/git-http
@@ -47,7 +47,6 @@ testitxfail() {
list="
//git.savannah.gnu.org/
-//git.savannah.gnu.org/robots.txt
//git.savannah.gnu.org/cgit/
//git.savannah.gnu.org/gitweb/
//git.savannah.gnu.org/r/
@@ -56,4 +55,39 @@ 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
+}
+
+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://git.savannah.gnu.org/robots.txt
+testrobots http://git.savannah.gnu.org/robots.txt
+
exit 0