From 06af3b204c6c6202b26674d90145489d2917e07f Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 9 Sep 2017 22:08:01 +0000 Subject: [PATCH] runruby.rb: set envvars for bundler * tool/runruby.rb: set gem and bundler environment variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- Makefile.in | 11 ++++++----- tool/runruby.rb | 6 +++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index b977e8c6fd..2764fe2211 100644 --- a/Makefile.in +++ b/Makefile.in @@ -479,13 +479,14 @@ test-bundler-precheck: $(arch)-fake.rb programs test-bundler-prepare: test-bundler-precheck $(XRUBY) -C "$(srcdir)" bin/gem install --no-ri --no-rdoc \ --install-dir spec/rspec --conservative 'rspec:~> 3.5' + +RSPECOPTS = --format progress +BUNDLER_SPECS = $(srcdir)/spec/bundler test-bundler: $(TEST_RUNNABLE)-test-bundler -yes-test-bundler: test-bundler-precheck test-bundler-prepare +yes-test-bundler: test-bundler-prepare $(gnumake_recursive)$(Q) \ - GEM_HOME=spec/rspec GEM_PATH=spec/rspec \ - BUNDLE_RUBY="$(abspath ./ruby) -I$(abspath $(srcdir)/lib) -I$(abspath .) -I$(abspath $(EXTOUT)/common) -I$(abspath $(EXTOUT)/$(arch))" \ - BUNDLE_GEM="$(abspath ./ruby) -I$(abspath $(srcdir)/lib) -I$(abspath .) -I$(abspath $(EXTOUT)/common) -I$(abspath $(EXTOUT)/$(arch)) -rubygems $(abspath $(srcdir)/bin/gem) --backtrace" \ - $(XRUBY) -C $(srcdir) -Ispec/bundler "spec/rspec/bin/rspec" --format progress spec/bundler + $(XRUBY) -C $(srcdir) -Ispec/bundler spec/rspec/bin/rspec \ + $(RSPECOPTS) $(BUNDLER_SPECS) no-test-bundler: update-src:: diff --git a/tool/runruby.rb b/tool/runruby.rb index f6c46779e3..be1be6a68b 100755 --- a/tool/runruby.rb +++ b/tool/runruby.rb @@ -76,7 +76,11 @@ env = { runner = File.join(abs_archdir, "ruby-runner#{config['EXEEXT']}") runner = nil unless File.exist?(runner) -env["RUBY"] = runner || File.expand_path(ruby) +abs_ruby = runner || File.expand_path(ruby) +env["RUBY"] = abs_ruby +env["GEM_PATH"] = env["GEM_HOME"] = File.expand_path("spec/rspec", srcdir) +env["BUNDLE_RUBY"] = abs_ruby +env["BUNDLE_GEM"] = "#{abs_ruby} -rrubygems #{srcdir}/bin/gem --backtrace" env["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR) if e = ENV["RUBYLIB"]