[Groonga-commit] groonga/groonga [master] [test] use rubygems.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 8月 6日 (土) 14:28:00 JST


Kouhei Sutou	2011-08-06 05:28:00 +0000 (Sat, 06 Aug 2011)

  New Revision: 00bb2693300f4afc591beeaed2f6a864bb9127cc

  Log:
    [test] use rubygems.

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

  Modified: test/unit/run-test.rb (+6 -52)
===================================================================
--- test/unit/run-test.rb    2011-08-06 05:27:42 +0000 (5b01ba4)
+++ test/unit/run-test.rb    2011-08-06 05:28:00 +0000 (e8941ba)
@@ -4,6 +4,11 @@ $KCODE = 'utf-8' unless defined?(Encoding)
 
 require 'rbconfig'
 require 'fileutils'
+require "rubygems"
+gem "test-unit", ">= 2.3.1"
+require "test/unit"
+require "test/unit/notify"
+require "json"
 
 build_dir = File.expand_path(ENV["BUILD_DIR"] || File.dirname(__FILE__))
 base_dir = File.expand_path(ENV["BASE_DIR"] || File.dirname(__FILE__))
@@ -11,57 +16,6 @@ base_dir = File.expand_path(ENV["BASE_DIR"] || File.dirname(__FILE__))
 test_lib_dir = File.expand_path(File.join(build_dir, "..", "lib"))
 FileUtils.mkdir_p(test_lib_dir)
 
-test_unit_dir = File.join(test_lib_dir, "test-unit-2.1.1")
-unless File.exist?(test_unit_dir)
-  require "open-uri"
-  tgz_uri = "http://rubyforge.org/frs/download.php/71835/test-unit-2.1.1.tgz"
-  tgz = File.join(build_dir, File.basename(tgz_uri))
-  File.open(tgz, "wb") do |output|
-    output.print(open(tgz_uri).read)
-  end
-  system("tar", "xfz", tgz, "-C", test_lib_dir)
-end
-$LOAD_PATH.unshift(File.join(test_unit_dir, "lib"))
-
-test_unit_notify_dir = File.join(test_lib_dir, "test-unit-notify-0.0.1")
-unless File.exist?(test_unit_notify_dir)
-  require "open-uri"
-  tgz_uri = "http://rubyforge.org/frs/download.php/71705/test-unit-notify-0.0.1.tgz"
-  tgz = File.join(build_dir, File.basename(tgz_uri))
-  File.open(tgz, "wb") do |output|
-    output.print(open(tgz_uri).read)
-  end
-  system("tar", "xfz", tgz, "-C", test_lib_dir)
-end
-$LOAD_PATH.unshift(File.join(test_unit_notify_dir, "lib"))
-
-require 'test/unit'
-require 'test/unit/version'
-require 'test/unit/notify'
-
-json_dir = File.join(test_lib_dir, "json-1.1.9")
-unless File.exist?(json_dir)
-  require "open-uri"
-  require "fileutils"
-  tgz_uri = "http://rubyforge.org/frs/download.php/62984/json-1.1.9.tgz"
-  tgz = File.join(build_dir, File.basename(tgz_uri))
-  File.open(tgz, "wb") do |output|
-    output.print(open(tgz_uri).read)
-  end
-  system("tar", "xfz", tgz, "-C", test_lib_dir)
-  ext_parser_dir = File.join(json_dir, "ext", "json", "ext", "parser")
-  Dir.chdir(ext_parser_dir) do
-    ruby = File.join(RbConfig::CONFIG["bindir"],
-                     RbConfig::CONFIG["ruby_install_name"])
-    system(ruby, "extconf.rb")
-    system("make")
-  end
-  FileUtils.mv(File.join(ext_parser_dir, "parser.so"),
-               File.join(json_dir, "lib", "json", "ext"))
-end
-$LOAD_PATH.unshift(File.join(json_dir, "lib"))
-
-
 $LOAD_PATH.unshift(File.join(base_dir, "lib", "ruby"))
 $LOAD_PATH.unshift(File.expand_path(File.join(base_dir, "..", "..", "tools")))
 
@@ -71,5 +25,5 @@ require 'groonga-local-gqtp-test-utils'
 require 'groonga-grntest-test-utils'
 
 ARGV.unshift("--exclude", "run-test.rb")
-ARGV.unshift("--notify")
+ARGV.unshift("--show-detail-immediately")
 exit Test::Unit::AutoRunner.run(true, File.dirname($0))




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