null+****@clear*****
null+****@clear*****
2011年 12月 15日 (木) 11:33:11 JST
Kouhei Sutou 2011-12-15 02:33:11 +0000 (Thu, 15 Dec 2011)
New Revision: ac7b3e02c05ce30f50288a2b23f1d73b4a8990ba
Log:
[test][ruby] support running test on not test/unit/ directory.
Added files:
test/unit/Gemfile
Modified files:
.gitignore
test/unit/run-test.sh
Modified: .gitignore (+1 -0)
===================================================================
--- .gitignore 2011-12-15 02:28:19 +0000 (c277218)
+++ .gitignore 2011-12-15 02:33:11 +0000 (cd564d5)
@@ -107,3 +107,4 @@ version.sh
/src/suggest/groonga-suggest-learner
/src/suggest/groonga-suggest-create-dataset
/tmp-doc/
+/test/unit/Gemfile.lock
Added: test/unit/Gemfile (+23 -0) 100644
===================================================================
--- /dev/null
+++ test/unit/Gemfile 2011-12-15 02:33:11 +0000 (b2ba8f2)
@@ -0,0 +1,23 @@
+# -*- mode: ruby; coding: utf-8 -*-
+#
+# Copyright (C) 2011 Kouhei Sutou <kou****@clear*****>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1 as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+source "http://rubygems.org/"
+
+gem "test-unit"
+gem "test-unit-notify"
+gem "json"
+gem "msgpack"
Modified: test/unit/run-test.sh (+3 -1)
===================================================================
--- test/unit/run-test.sh 2011-12-15 02:28:19 +0000 (f04cc74)
+++ test/unit/run-test.sh 2011-12-15 02:33:11 +0000 (e6f7b77)
@@ -80,10 +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
+ BUNDLE_GEMFILE=$BASE_DIR/Gemfile
+ export BUNDLE_GEMFILE
if ! type bundle > /dev/null; then
$RUBY -S gem install bundler
fi
- if [ $BASE_DIR/Gemfile -nt $BASE_DIR/Gemfile.lock ]; then
+ if [ "$BUNDLE_GEMFILE" -nt "$BUNDLE_GEMFILE.lock" ]; then
$RUBY -S bundle install
fi
$RUBY $BASE_DIR/run-test.rb $RUBY_TEST_ARGS "$@"