summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 71f1a21)
raw | patch | inline | side by side (parent: 71f1a21)
author | Brian Gernhardt <brian@gernhardtsoftware.com> | |
Sat, 6 Feb 2010 05:00:40 +0000 (00:00 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 6 Feb 2010 05:12:06 +0000 (21:12 -0800) |
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>
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>
t/t9501-gitweb-standalone-http-status.sh | patch | blob | history |
index 7590f10b66b6fafc5baf3f9751b57469248f8e83..992d72961d617d38125862b576de27f46d45e92b 100755 (executable)
# ----------------------------------------------------------------------
# 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