[Groonga-commit] groonga/grntest [master] Use groonga-httpd for HTTP tests when --groonga-httpd option is specified

Back to archive index

null+****@clear***** null+****@clear*****
2012年 6月 12日 (火) 12:11:37 JST


Haruka Yoshihara	2012-06-12 12:11:37 +0900 (Tue, 12 Jun 2012)

  New Revision: 793730d52afff0c92b2289b076435755a3d4961f

  Log:
    Use groonga-httpd for HTTP tests when --groonga-httpd option is specified

  Modified files:
    lib/groonga/tester.rb

  Modified: lib/groonga/tester.rb (+8 -10)
===================================================================
--- lib/groonga/tester.rb    2012-06-12 11:54:06 +0900 (812b481)
+++ lib/groonga/tester.rb    2012-06-12 12:11:37 +0900 (20c79c0)
@@ -327,11 +327,7 @@ module Groonga
         port = 50041
         pid_file = Tempfile.new("groonga.pid")
 
-        groonga_options = groonga_http_options(host, port, pid_file, context)
-        command_line = [
-          @tester.groonga,
-        ]
-        command_line.concat(groonga_options)
+        command_line = groonga_http_command(host, port, pid_file, context)
         system(*command_line)
         begin
           executor = HTTPExecutor.new(host, port, context)
@@ -353,17 +349,19 @@ module Groonga
         end
       end
 
-      def groonga_http_options(host, port, pid_file, context)
-        if File.basename(@tester.groonga) == "groonga-httpd"
+      def groonga_http_command(host, port, pid_file, context)
+        unles****@teste*****_httpd.nil?
           db_path = context.db_path
           config_file = create_config_file(host, port, db_path, pid_file)
           real_basepath = File.realpath(@tester.base_directory)
-          groonga_options = [
+          command_line = [
+            @tester.groonga_httpd,
             "-c", config_file.path,
             "-p", File.join(real_basepath, "/"),
           ]
         else
-          groonga_options = [
+          command_line = [
+            @tester.groonga,
             "--pid-path", pid_file.path,
             "--bind-address", host,
             "--port", port.to_s,
@@ -372,7 +370,7 @@ module Groonga
             "-n", context.db_path,
           ]
         end
-        groonga_options
+        command_line
       end
 
       def create_config_file(host, port, db_path, pid_file)




Groonga-commit メーリングリストの案内
Back to archive index