summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-18 18:37:52 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-18 18:37:52 +0000
commit49ef9b1e49a0f2b53a97afbacb0bed0f20b1fab1 (patch)
treec2c077397a917963390db8629e04411e66e21d17 /bin
parent3335f9936fa1aa700ca634e32c3178743bcb2f74 (diff)
Added --fail flag.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/custodian-dequeue16
1 files changed, 15 insertions, 1 deletions
diff --git a/bin/custodian-dequeue b/bin/custodian-dequeue
index 85bc6f3..dd5daa6 100755
--- a/bin/custodian-dequeue
+++ b/bin/custodian-dequeue
@@ -6,6 +6,7 @@
# SYNOPSIS
# custodian-dequeue [ -h | --help ]
# [ -m | --manual]
+# [ -f | --fail ]
# [ -l | --logfile FILE]
# [ -S | --server 1.2.3.4:123 ]
# [ -s | --single ]
@@ -23,6 +24,8 @@
#
# -s, --single Run a single test and exit. Don't poll the queue for more.
#
+# -f, --fail Run tests but stop the first time we see a fail.
+#
# -v, --verbose Be noisy.
#
#
@@ -72,6 +75,7 @@ if __FILE__ == $0 then
opts = GetoptLong.new(
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
[ "--manual", "-m", GetoptLong::NO_ARGUMENT ],
+ [ "--fail", "-f", GetoptLong::NO_ARGUMENT ],
[ "--logfile", "-l", GetoptLong::REQUIRED_ARGUMENT ],
[ "--repeat", "-r", GetoptLong::REQUIRED_ARGUMENT ],
[ "--server", "-S", GetoptLong::REQUIRED_ARGUMENT ],
@@ -90,6 +94,8 @@ if __FILE__ == $0 then
$SERVER = arg
when "--single":
ENV["SINGLE"] = "1"
+ when "--fail":
+ ENV["FAIL"] = "1"
when "--help":
$help = true
when "--manual":
@@ -142,7 +148,15 @@ if __FILE__ == $0 then
# Single step?
#
if ( ENV['SINGLE'] )
- worker.process_single_job
+ worker.process_single_job()
+ exit(0)
+ end
+
+ #
+ # Run until we see a failure?
+ #
+ if ( ENV['FAIL'] )
+ worker.process_until_fail()
exit(0)
end