summaryrefslogtreecommitdiff
path: root/tool/test-bundled-gems.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-10-28 15:49:55 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-11-09 03:32:46 +0900
commitefe7e6e949cc6137f2c918522f866cf6b99309ce (patch)
tree81132ad57b6936426752de42feb33ac8c501b563 /tool/test-bundled-gems.rb
parentbd2674ad3354bd20e026d237a461e88af3834604 (diff)
Bundle rbs 1.7.0.beta.5
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5042
Diffstat (limited to 'tool/test-bundled-gems.rb')
-rw-r--r--tool/test-bundled-gems.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/tool/test-bundled-gems.rb b/tool/test-bundled-gems.rb
index ef491f9db4..d9192f1bb9 100644
--- a/tool/test-bundled-gems.rb
+++ b/tool/test-bundled-gems.rb
@@ -9,6 +9,7 @@ allowed_failures = allowed_failures.split(',').reject(&:empty?)
rake = File.realpath("../../.bundle/bin/rake", __FILE__)
gem_dir = File.realpath('../../gems', __FILE__)
+dummy_rake_compiler_dir = File.realpath('../dummy-rake-compiler', __FILE__)
exit_code = 0
ruby = ENV['RUBY'] || RbConfig.ruby
failed = []
@@ -33,6 +34,14 @@ File.foreach("#{gem_dir}/bundled_gems") do |line|
test_command << " stdlib_test validate"
first_timeout *= 3
+
+ # copied from debug gem
+ build_dir = 'ext/-test-/gems/rbs'
+ FileUtils.mkdir_p(build_dir)
+ extconf_path = File.expand_path('../../gems/src/rbs/ext/rbs_extension/extconf.rb', __FILE__)
+ system("#{ruby} -C #{build_dir} #{extconf_path}") or raise
+ system("cd #{build_dir} && make extout=../../../../.ext libdir=../../../..") or raise
+ ENV["RUBYLIB"] = [File.expand_path(dummy_rake_compiler_dir), File.expand_path(build_dir), ENV.fetch("RUBYLIB", nil)].compact.join(":")
end
if gem == "minitest"