[Groonga-commit] groonga/groonga at 3d61ac3 [master] test: support not only query optimizer but also mruby written plugins

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Oct 7 17:18:59 JST 2015


Kouhei Sutou	2015-10-07 17:18:59 +0900 (Wed, 07 Oct 2015)

  New Revision: 3d61ac34d8ae4b5445fc42b36bcef0198329e452
  https://github.com/groonga/groonga/commit/3d61ac34d8ae4b5445fc42b36bcef0198329e452

  Message:
    test: support not only query optimizer but also mruby written plugins

  Added files:
    test/mruby/helper.rb
    test/mruby/rroonga
  Removed files:
    test/query_optimizer/helper.rb
    test/query_optimizer/rroonga
  Modified files:
    .gitignore
    .gitmodules
  Renamed files:
    test/mruby/helper/expression.rb
      (from test/query_optimizer/helper/query_optimizer.rb)
    test/mruby/helper/sandbox.rb
      (from test/query_optimizer/helper/sandbox.rb)
    test/mruby/run-test.rb
      (from test/query_optimizer/run-test.rb)
    test/mruby/suite/query_optimizer/test_estimate_size.rb
      (from test/query_optimizer/suite/test_estimate_size.rb)
    test/mruby/suite/query_optimizer/test_index.rb
      (from test/query_optimizer/suite/test_index.rb)
    test/mruby/suite/query_optimizer/test_no_index.rb
      (from test/query_optimizer/suite/test_no_index.rb)

  Modified: .gitignore (+2 -2)
===================================================================
--- .gitignore    2015-10-07 16:45:15 +0900 (6a898a3)
+++ .gitignore    2015-10-07 17:18:59 +0900 (993c3c0)
@@ -168,7 +168,7 @@ CMakeFiles
 /test/command/run-test.sh.log
 /test/command/run-test.sh.trs
 /test/command/test-suite.log
-/test/query_optimizer/rroonga.built
-/test/query_optimizer/groonga.pc
+/test/mruby/rroonga.built
+/test/mruby/groonga.pc
 /*.tar.gz
 /tmp

  Modified: .gitmodules (+2 -2)
===================================================================
--- .gitmodules    2015-10-07 16:45:15 +0900 (d43a86e)
+++ .gitmodules    2015-10-07 17:18:59 +0900 (db91500)
@@ -4,6 +4,6 @@
 [submodule "vendor/onigmo-source"]
 	path = vendor/onigmo-source
 	url = https://github.com/k-takata/Onigmo.git
-[submodule "test/query_optimizer/rroonga"]
-	path = test/query_optimizer/rroonga
+[submodule "test/mruby/rroonga"]
+	path = test/mruby/rroonga
 	url = https://github.com/ranguba/rroonga.git

  Added: test/mruby/helper.rb (+33 -0) 100644
===================================================================
--- /dev/null
+++ test/mruby/helper.rb    2015-10-07 17:18:59 +0900 (bd45284)
@@ -0,0 +1,33 @@
+require "fileutils"
+
+require "test-unit"
+
+require_relative "helper/sandbox"
+require_relative "helper/expression"
+
+class GroongaTestCase < Test::Unit::TestCase
+  include Sandbox
+  include Expression
+
+  setup :setup_sandbox, :before => :prepend
+  teardown :teardown_sandbox, :after => :append
+end
+
+class QueryOptimizerTestCase < GroongaTestCase
+  def dump_plan(text, options={})
+    parse(text, options)
+    @expression.dump_plan
+  end
+end
+
+class ExpressionRewriterTestCase < GroongaTestCase
+  def dump_rewritten_plan(text, options={})
+    parse(text, options)
+    rewritten_expression =****@expre*****
+    if rewritten_expression
+      rewritten_expression.dump_plan
+    else
+      nil
+    end
+  end
+end

  Renamed: test/mruby/helper/expression.rb (+1 -6) 75%
===================================================================
--- test/query_optimizer/helper/query_optimizer.rb    2015-10-07 16:45:15 +0900 (619271b)
+++ test/mruby/helper/expression.rb    2015-10-07 17:18:59 +0900 (90a6102)
@@ -1,4 +1,4 @@
-module QueryOptimizer
+module Expression
   def setup_expression(domain)
     @expression = Groonga::Expression.new
     @expression.define_variable(:domain => domain)
@@ -14,9 +14,4 @@ module QueryOptimizer
     }
     @expression.parse(text, default_options.merge(options))
   end
-
-  def dump_plan(text, options={})
-    parse(text, options)
-    @expression.dump_plan
-  end
 end

  Renamed: test/mruby/helper/sandbox.rb (+0 -0) 100%
===================================================================

  Added: test/mruby/rroonga (+1 -0) 160000
===================================================================
--- /dev/null
+++ test/mruby/rroonga    2015-10-07 17:18:59 +0900 (e0a28f7)
@@ -0,0 +1 @@
+Subproject commit e0a28f7567a1a4054a17bb60a8c72240e2785155

  Renamed: test/mruby/run-test.rb (+1 -1) 96%
===================================================================
--- test/query_optimizer/run-test.rb    2015-10-07 16:45:15 +0900 (954a702)
+++ test/mruby/run-test.rb    2015-10-07 17:18:59 +0900 (53b556f)
@@ -8,7 +8,7 @@ current_dir_path    = Pathname.pwd
 base_dir_path       = Pathname(__FILE__).dirname
 source_top_dir_path = base_dir_path.parent.parent
 build_top_dir_path  = current_dir_path
-build_base_dir_path = build_top_dir_path + "test/query_optimizer"
+build_base_dir_path = build_top_dir_path + "test/mruby"
 
 Dir.chdir(build_top_dir_path.to_s) do
   system("make -j8 > /dev/null") or exit(false)

  Renamed: test/mruby/suite/query_optimizer/test_estimate_size.rb (+0 -0) 100%
===================================================================

  Renamed: test/mruby/suite/query_optimizer/test_index.rb (+0 -0) 100%
===================================================================

  Renamed: test/mruby/suite/query_optimizer/test_no_index.rb (+0 -0) 100%
===================================================================

  Deleted: test/query_optimizer/helper.rb (+0 -17) 100644
===================================================================
--- test/query_optimizer/helper.rb    2015-10-07 16:45:15 +0900 (c54f9e9)
+++ /dev/null
@@ -1,17 +0,0 @@
-require "fileutils"
-
-require "test-unit"
-
-require_relative "helper/sandbox"
-require_relative "helper/query_optimizer"
-
-class GroongaTestCase < Test::Unit::TestCase
-  include Sandbox
-
-  setup :setup_sandbox, :before => :prepend
-  teardown :teardown_sandbox, :after => :append
-end
-
-class QueryOptimizerTestCase < GroongaTestCase
-  include QueryOptimizer
-end

  Deleted: test/query_optimizer/rroonga (+0 -1) 160000
===================================================================
--- test/query_optimizer/rroonga    2015-10-07 16:45:15 +0900 (69cdff8)
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 69cdff8d74887df9642cc7849c4129c019e30662
-------------- next part --------------
HTML����������������������������...
Download 



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