[Groonga-commit] groonga/groonga [master] [test][ruby] use bundler.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 12月 15日 (木) 11:28:19 JST


Kouhei Sutou	2011-12-15 02:28:19 +0000 (Thu, 15 Dec 2011)

  New Revision: cd4e7d0e2654a094fd8b10c82629f451e5a52f9e

  Log:
    [test][ruby] use bundler.

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

  Modified: test/unit/run-test.rb (+2 -1)
===================================================================
--- test/unit/run-test.rb    2011-12-14 14:12:10 +0000 (0a46d56)
+++ test/unit/run-test.rb    2011-12-15 02:28:19 +0000 (834f314)
@@ -5,10 +5,11 @@ $KCODE = 'utf-8' unless defined?(Encoding)
 require 'rbconfig'
 require 'fileutils'
 require "rubygems"
-gem "test-unit", ">= 2.3.1"
+require "bundler/setup"
 require "test/unit"
 require "test/unit/notify"
 require "json"
+require "msgpack"
 
 build_dir = File.expand_path(ENV["BUILD_DIR"] || File.dirname(__FILE__))
 base_dir = File.expand_path(ENV["BASE_DIR"] || File.dirname(__FILE__))

  Modified: test/unit/run-test.sh (+6 -0)
===================================================================
--- test/unit/run-test.sh    2011-12-14 14:12:10 +0000 (b0b0c5e)
+++ test/unit/run-test.sh    2011-12-15 02:28:19 +0000 (f04cc74)
@@ -80,6 +80,12 @@ ruby_result=0
 if test "$NO_RUBY" != "yes" -a -n "$RUBY"; then
     : ${TEST_UNIT_MAX_DIFF_TARGET_STRING_SIZE:=30000}
     export TEST_UNIT_MAX_DIFF_TARGET_STRING_SIZE
+    if ! type bundle > /dev/null; then
+	$RUBY -S gem install bundler
+    fi
+    if [ $BASE_DIR/Gemfile -nt $BASE_DIR/Gemfile.lock ]; then
+	$RUBY -S bundle install
+    fi
     $RUBY $BASE_DIR/run-test.rb $RUBY_TEST_ARGS "$@"
     ruby_result=$?
     no_test=0




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