[Groonga-commit] groonga/grntest [master] Use inplace reporter for multi workers

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Aug 11 18:54:06 JST 2012


Kouhei Sutou	2012-08-11 18:54:06 +0900 (Sat, 11 Aug 2012)

  New Revision: f02b2e40eead4bff425f0a5a67a6db58c878b045
  https://github.com/groonga/grntest/commit/f02b2e40eead4bff425f0a5a67a6db58c878b045

  Log:
    Use inplace reporter for multi workers

  Modified files:
    lib/groonga/tester.rb

  Modified: lib/groonga/tester.rb (+17 -4)
===================================================================
--- lib/groonga/tester.rb    2012-08-11 18:51:33 +0900 (19e4272)
+++ lib/groonga/tester.rb    2012-08-11 18:54:06 +0900 (9c2e663)
@@ -112,7 +112,7 @@ module Groonga
         parser.on("--reporter=REPORTER", available_reporters,
                   "Report test result by REPORTER",
                   "[#{available_reporter_labels}]",
-                  "(#{tester.reporter})") do |reporter|
+                  "(auto)") do |reporter|
           tester.reporter = reporter
         end
 
@@ -157,11 +157,11 @@ module Groonga
 
     attr_accessor :groonga, :groonga_httpd, :groonga_suggest_create_dataset
     attr_accessor :protocol, :testee
-    attr_accessor :base_directory, :diff, :diff_options, :reporter
+    attr_accessor :base_directory, :diff, :diff_options
     attr_accessor :n_workers
     attr_accessor :output
     attr_accessor :gdb, :default_gdb
-    attr_writer :keep_database, :use_color
+    attr_writer :reporter, :keep_database, :use_color
     def initialize
       @groonga = "groonga"
       @groonga_httpd = "groonga-httpd"
@@ -169,9 +169,10 @@ module Groonga
       @protocol = :gqtp
       @testee = "groonga"
       @base_directory = "."
-      @reporter = :stream
+      @reporter = nil
       @n_workers = 1
       @output = $stdout
+      @keep_database = false
       @use_color = nil
       detect_suitable_diff
       initialize_debuggers
@@ -185,6 +186,18 @@ module Groonga
       run_test_suites(test_suites)
     end
 
+    def reporter
+      if****@repor*****?
+        if @n_workers == 1
+          :stream
+        else
+          :inplace
+        end
+      else
+        @reporter
+      end
+    end
+
     def keep_database?
       @keep_database
     end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index