summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-24 10:50:01 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-24 10:50:01 +0000
commit9dcf6c41f3d8a7600714afa49be497be484c46a1 (patch)
treecb29b9d79da25e53298291ad154f283f96aa2f8a /bin
parent52387b65fa68bf617d10fcc7b2ea3f0f5b10775a (diff)
Remove the --timeout parameter.
Abort if parsing fails.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/custodian-enqueue26
1 files changed, 11 insertions, 15 deletions
diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue
index 890afc3..fae0779 100755
--- a/bin/custodian-enqueue
+++ b/bin/custodian-enqueue
@@ -9,7 +9,6 @@
# [ -f | --file FILE]
# [ -d | --dump ]
# [ | --test ]
-# [ -t | --timeout N ]
#
# OPTIONS
#
@@ -23,7 +22,6 @@
#
# -f, --file FILE Parse the given configuration file.
#
-# -t, --timeout N Specify the timeout period for the tests.
#
#
# ABOUT
@@ -84,8 +82,7 @@ if __FILE__ == $0 then
[ "--server", GetoptLong::REQUIRED_ARGUMENT ],
[ "--file", "-f", GetoptLong::REQUIRED_ARGUMENT ],
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
- [ "--manual","-m", GetoptLong::NO_ARGUMENT ],
- [ "--timeout","-t", GetoptLong::REQUIRED_ARGUMENT ]
+ [ "--manual","-m", GetoptLong::NO_ARGUMENT ]
)
opts.each do |opt, arg|
case opt
@@ -97,8 +94,6 @@ if __FILE__ == $0 then
$SERVER = arg
when "--file" then
ENV["FILE"] = arg
- when "--timeout" then
- ENV["TIMEOUT"] = arg
when "--help" then
$help = true
when "--manual" then
@@ -152,21 +147,22 @@ if __FILE__ == $0 then
#
- # Create the parser
+ # Create the parser object.
#
mon = Custodian::Parser.new()
- #
- # Set the timeout
- #
- if ( !ENV['TIMEOUT'].nil? )
- mon.set_timeout( ENV['TIMEOUT'] )
- end
#
- # Run the parser - and get callbacks when a new job is added.
+ # Parse our configuration file. If there are errors then we'll
+ # exit this script.
#
- mon.parse_file( ENV['FILE'] )
+ begin
+ mon.parse_file( ENV['FILE'] )
+ rescue => e
+ puts "Failure in parsing the configuration file : #{ENV['FILE']}"
+ puts e.to_s
+ exit( 1 )
+ end
mon.jobs.each do |test|