lib/grntest/tester.rb in grntest-1.1.5 vs lib/grntest/tester.rb in grntest-1.1.6

- old
+ new

@@ -204,10 +204,16 @@ "Enable colorized output", "(auto)") do |use_color| tester.use_color = use_color end + parser.on("--timeout=SECOND", Float, + "Timeout for each test", + "(#{tester.timeout})") do |timeout| + tester.timeout = timeout + end + parser.on("--version", "Show version and exit") do puts(VERSION) throw(tag, true) end @@ -245,10 +251,11 @@ attr_accessor :base_directory, :database_path, :diff, :diff_options attr_accessor :n_workers attr_accessor :output attr_accessor :gdb, :default_gdb attr_accessor :valgrind, :default_valgrind + attr_accessor :timeout attr_writer :valgrind_gen_suppressions attr_writer :reporter, :keep_database, :use_color attr_writer :stop_on_failure attr_writer :suppress_omit_log attr_reader :test_patterns, :test_suite_patterns @@ -277,9 +284,10 @@ @exclude_test_patterns = [] @exclude_test_suite_patterns = [] detect_suitable_diff initialize_debuggers initialize_memory_checkers + @timeout = 5 end def run(*targets) succeeded = true return succeeded if targets.empty?