about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/GNUmakefile9
-rw-r--r--t/test-rails3.sh2
2 files changed, 9 insertions, 2 deletions
diff --git a/t/GNUmakefile b/t/GNUmakefile
index e80c43a..9af9551 100644
--- a/t/GNUmakefile
+++ b/t/GNUmakefile
@@ -17,6 +17,13 @@ endif
 RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))')
 export RUBY_ENGINE
 
+isolate_libs := ../tmp/isolate/.$(RUBY_ENGINE)-$(RUBY_VERSION).libs
+MYLIBS := $(shell cat $(isolate_libs))
+ifeq ($(MY_LIBS),)
+  ignore := $(shell cd .. && $(RUBY) ./script/isolate_for_tests)
+  MYLIBS := $(shell cat $(isolate_libs))
+endif
+
 T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
 
 all:: $(T)
@@ -58,7 +65,7 @@ $(test_prefix)/.stamp:
 $(T): export RUBY := $(RUBY)
 $(T): export RAKE := $(RAKE)
 $(T): export PATH := $(test_prefix)/bin:$(PATH)
-$(T): export RUBYLIB := $(test_prefix)/lib:$(RUBYLIB)
+$(T): export RUBYLIB := $(test_prefix)/lib:$(MYLIBS)
 $(T): dep $(test_prefix)/.stamp trash/.gitignore
         $(TRACER) $(SHELL) $(SH_TEST_OPTS) $@ $(TEST_OPTS)
 
diff --git a/t/test-rails3.sh b/t/test-rails3.sh
index b398f03..907ef0d 100644
--- a/t/test-rails3.sh
+++ b/t/test-rails3.sh
@@ -13,7 +13,7 @@ rails_gems=../tmp/isolate/rails-$RAILS_VERSION/gems
 rails_bin="$rails_gems/rails-$RAILS_VERSION/bin/rails"
 if ! test -d "$arch_gems" || ! test -d "$rails_gems" || ! test -x "$rails_bin"
 then
-        ( cd ../ && $RAKE isolate )
+        ( cd ../ && ./script/isolate_for_tests )
 fi
 
 for i in $arch_gems/*-* $rails_gems/*-*