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
commit0631befbe7132b2e7f693a57e9634314f57e7125 (patch)
treecb29b9d79da25e53298291ad154f283f96aa2f8a /bin
parent7e3d7759c91c95fa41a24ca4143d1caf2a9e2771 (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|