git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t9501: Skip testing load if we can't detect it
@ 2010-02-06  5:00 Brian Gernhardt
  2010-02-06 11:22 ` Jakub Narebski
  0 siblings, 1 reply; 8+ messages in thread
From: Brian Gernhardt @ 2010-02-06  5:00 UTC (permalink / raw)
  To: Git List; +Cc: Junio C Hamano

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>
---
 t/t9501-gitweb-standalone-http-status.sh |    9 ++++++++-
 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 7590f10..992d729 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
-- 
1.7.0.rc1.141.gd3fd2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-02-06 20:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-06  5:00 [PATCH] t9501: Skip testing load if we can't detect it Brian Gernhardt
2010-02-06 11:22 ` Jakub Narebski
2010-02-06 13:46   ` Brian Gernhardt
2010-02-06 14:05     ` Jakub Narebski
2010-02-06 14:50       ` [PATCH] t9501: Correctly force over max load everywhere Brian Gernhardt
2010-02-06 19:45         ` Jakub Narebski
2010-02-06 18:31       ` [PATCH] t9501: Skip testing load if we can't detect it Junio C Hamano
2010-02-06 20:09         ` Brian Gernhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).