Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gernhardt <brian@gernhardtsoftware.com>2010-02-06 08:00:40 +0300
committerJunio C Hamano <gitster@pobox.com>2010-02-06 08:12:06 +0300
commit6448e0ce44295c5168628a658614f2915cc3cd1f (patch)
tree6801b380a49dc8319156b682a7e5b429a9cd72f6 /t/t9501-gitweb-standalone-http-status.sh
parent71f1a216e74460ac9c36bc892ec215336b928e2e (diff)
t9501: Skip testing load if we can't detect it
Currently gitweb only knows how to check for load using /proc/loadavg, which isn't available on all systems. We shouldn't fail the test just because we don't know how to check the system load. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9501-gitweb-standalone-http-status.sh')
-rwxr-xr-xt/t9501-gitweb-standalone-http-status.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh
index 7590f10b66..992d72961d 100755
--- a/t/t9501-gitweb-standalone-http-status.sh
+++ b/t/t9501-gitweb-standalone-http-status.sh
@@ -115,12 +115,19 @@ test_debug 'cat gitweb.output'
# ----------------------------------------------------------------------
# load checking
+if test -e /proc/loadavg
+then
+ test_set_prereq PROC_LOADAVG
+else
+ say 'skipping load tests (no /proc/loadavg found)'
+fi
+
# always hit the load limit
cat >>gitweb_config.perl <<\EOF
our $maxload = 0;
EOF
-test_expect_success 'load checking: load too high (default action)' '
+test_expect_success PROC_LOADAVG 'load checking: load too high (default action)' '
gitweb_run "p=.git" &&
grep "Status: 503 Service Unavailable" gitweb.headers &&
grep "503 - The load average on the server is too high" gitweb.body