YUKI Hiroshi
null+****@clear*****
Fri Mar 20 12:32:10 JST 2015
YUKI Hiroshi 2015-03-20 12:32:10 +0900 (Fri, 20 Mar 2015) New Revision: 22502fd37ca6671f5b8e19f8d7589e5cd71fa298 https://github.com/droonga/drntest/commit/22502fd37ca6671f5b8e19f8d7589e5cd71fa298 Message: Add --exit-on-stalled option to skip running on following tests. It is possibly useful mainly on Travis CI. Modified files: lib/drntest/configuration.rb lib/drntest/tester.rb Modified: lib/drntest/configuration.rb (+6 -0) =================================================================== --- lib/drntest/configuration.rb 2015-03-20 11:11:43 +0900 (8070569) +++ lib/drntest/configuration.rb 2015-03-20 12:32:10 +0900 (fb95c07) @@ -20,6 +20,7 @@ module Drntest attr_accessor :droonga_engine, :droonga_engine_options attr_accessor :catalog_version attr_accessor :timeout + attr_writer :exit_on_stalled def initialize @port = 24224 @@ -31,6 +32,7 @@ module Drntest @droonga_engine_options = [] @catalog_version = "2" @timeout = 1 + @exit_on_stalled = false end def suite_path @@ -40,5 +42,9 @@ module Drntest def engine_config_path @base_path + "config" + @engine_config end + + def exit_on_stalled? + @exit_on_stalled + end end end Modified: lib/drntest/tester.rb (+10 -1) =================================================================== --- lib/drntest/tester.rb 2015-03-20 11:11:43 +0900 (efd36c2) +++ lib/drntest/tester.rb 2015-03-20 12:32:10 +0900 (f16c107) @@ -49,7 +49,11 @@ module Drntest tests = load_tests(*targets) tests.each do |test| test_runner = TestRunner.new(@config, test) - test_suites_result.test_results << test_runner.run + result = test_runner.run + test_suites_result.test_results << result + if result.status == :no_response and****@confi*****_on_stalled? + break + end end puts @@ -129,6 +133,11 @@ module Drntest @config.timeout = timeout end + parser.on("--exit-on-stalled", + "Stop running of tests when \"NO RESPONSE\" result appears on any testcase") do + @config.exit_on_stalled = true + end + parser end -------------- next part -------------- HTML����������������������������...Download