Kouhei Sutou
null+****@clear*****
Wed Jun 13 17:22:45 JST 2018
Kouhei Sutou 2018-06-13 17:22:45 +0900 (Wed, 13 Jun 2018) New Revision: 502968ea948bb10ac9e6ae9929565a3bc4b8165c https://github.com/groonga/groonga-query-log/commit/502968ea948bb10ac9e6ae9929565a3bc4b8165c Message: verify-server: return true on success Modified files: lib/groonga-query-log/command/verify-server.rb lib/groonga-query-log/server-verifier.rb Modified: lib/groonga-query-log/command/verify-server.rb (+6 -3) =================================================================== --- lib/groonga-query-log/command/verify-server.rb 2018-06-13 10:47:31 +0900 (f3eddc1) +++ lib/groonga-query-log/command/verify-server.rb 2018-06-13 17:22:45 +0900 (86967da) @@ -27,17 +27,20 @@ module GroongaQueryLog def run(command_line, &callback) input_paths = create_parser.parse(command_line) + same = true verifier = ServerVerifier.new(@options) if input_paths.empty? - verifier.verify($stdin, &callback) + same = verifier.verify($stdin, &callback) else input_paths.each do |input_path| File.open(input_path) do |input| - verifier.verify(input, &callback) + unless verifier.verify(input, &callback) + same = false + end end end end - true + same end private Modified: lib/groonga-query-log/server-verifier.rb (+3 -0) =================================================================== --- lib/groonga-query-log/server-verifier.rb 2018-06-13 10:47:31 +0900 (ec27e2d) +++ lib/groonga-query-log/server-verifier.rb 2018-06-13 17:22:45 +0900 (e5715cd) @@ -31,11 +31,13 @@ module GroongaQueryLog end def verify(input, &callback) + @same = true producer = run_producer(input, &callback) reporter = run_reporter producer.join @different_results.push(nil) reporter.join + @same end private @@ -145,6 +147,7 @@ module GroongaQueryLog end def report_result(output, result) + @same = false command, response1, response2 = result command_source = command.original_source || command.to_uri_format output.puts("command: #{command_source}") -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180613/432d5e85/attachment-0001.htm