[Groonga-commit] groonga/groonga at e1bee84 [master] test: generalize

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 10 14:37:57 JST 2018


Kouhei Sutou	2018-04-10 14:37:57 +0900 (Tue, 10 Apr 2018)

  New Revision: e1bee843d58d6b3c07bb0da0e70a05f45f739fe1
  https://github.com/groonga/groonga/commit/e1bee843d58d6b3c07bb0da0e70a05f45f739fe1

  Message:
    test: generalize

  Modified files:
    test/mruby/run-test.rb

  Modified: test/mruby/run-test.rb (+6 -3)
===================================================================
--- test/mruby/run-test.rb    2018-04-10 14:16:56 +0900 (21eada2c1)
+++ test/mruby/run-test.rb    2018-04-10 14:37:57 +0900 (2a1382a56)
@@ -64,9 +64,12 @@ if rroonga_revision != rroonga_built_revision
 end
 
 if build_top_dir_path != source_top_dir_path
-  plugin_relative_path = "plugins/expression_rewriters"
-  FileUtils.cp(Dir.glob(source_top_dir_path + "#{plugin_relative_path}/*.rb"),
-               build_top_dir_path + plugin_relative_path)
+  Dir.glob(source_top_dir_path + "plugins/**/*.rb") do |source_rb|
+    relative_path = Pathname(source_rb).relative_path_from(source_top_dir_path)
+    build_rb = build_top_dir_path + relative_path
+    FileUtils.mkdir_p(build_rb.dirname)
+    FileUtils.cp(source_rb, build_rb)
+  end
 end
 ENV["GRN_PLUGINS_DIR"] = (build_top_dir_path + "plugins").to_s
 ENV["GRN_RUBY_SCRIPTS_DIR"] = (source_top_dir_path + "lib/mrb/scripts").to_s
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180410/29f75450/attachment.htm 



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