Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tool/test-bundled-gems.rb: Use the bundled RBS code to test TypeProf #4774

Merged
merged 1 commit into from Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.mk
Expand Up @@ -1372,7 +1372,7 @@ no-test-bundled-gems-prepare: no-test-bundled-gems-precheck
yes-test-bundled-gems-prepare: yes-test-bundled-gems-precheck
$(ACTIONS_GROUP)
$(XRUBY) -C "$(srcdir)" bin/gem install --no-document \
--install-dir .bundle --conservative "bundler" "minitest:~> 5" "test-unit" "rake" "hoe" "yard" "pry" "packnga" "rexml" "json-schema" "rbs"
--install-dir .bundle --conservative "bundler" "minitest:~> 5" "test-unit" "rake" "hoe" "yard" "pry" "packnga" "rexml" "json-schema"
$(ACTIONS_ENDGROUP)

PREPARE_BUNDLED_GEMS = test-bundled-gems-prepare
Expand Down
2 changes: 1 addition & 1 deletion gems/bundled_gems
Expand Up @@ -11,5 +11,5 @@ net-pop 0.1.1 https://github.com/ruby/net-pop
net-smtp 0.2.1 https://github.com/ruby/net-smtp
matrix 0.4.2 https://github.com/ruby/matrix
prime 0.1.2 https://github.com/ruby/prime
typeprof 0.15.2 https://github.com/ruby/typeprof
rbs 1.5.1 https://github.com/ruby/rbs
typeprof 0.15.2 https://github.com/ruby/typeprof
5 changes: 5 additions & 0 deletions tool/test-bundled-gems.rb
Expand Up @@ -20,6 +20,11 @@
test_command = "#{ruby} -C #{gem_dir}/src/#{gem} -Ilib #{rake} test"
first_timeout = 600 # 10min

if gem == "typeprof"
raise "need to run rbs test suite before typeprof" unless File.readable?("#{gem_dir}/src/rbs/lib/rbs/parser.rb")
ENV["RUBYLIB"] = ["#{gem_dir}/src/rbs/lib", ENV.fetch("RUBYLIB", nil)].compact.join(":")
end

if gem == "rbs"
racc = File.realpath("../../libexec/racc", __FILE__)
pid = Process.spawn("#{ruby} -C #{gem_dir}/src/#{gem} -Ilib #{racc} -v -o lib/rbs/parser.rb lib/rbs/parser.y")
Expand Down