summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-23 01:59:49 (GMT)
committerGitHub <noreply@github.com>2020-09-23 01:59:49 (GMT)
commitba889100d850e973e519cebc48d5b4f1e8ab0034 (patch)
tree9612c4712137d35404da81b425b45edd5d3a639a
parente380f78851b27511f165bcd841626f2cb9fa87be (diff)
Bundle rbs gem as bundled gems (#3496)
* Added rbs as bundled gems * Added the missing dependencies for rbs gem
Notes
Notes: Merged-By: soutaro <matsumoto@soutaro.com>
-rw-r--r--common.mk2
-rw-r--r--gems/bundled_gems1
-rw-r--r--tool/test-bundled-gems.rb12
3 files changed, 12 insertions, 3 deletions
diff --git a/common.mk b/common.mk
index 936846d..62e139a 100644
--- a/common.mk
+++ b/common.mk
@@ -1349,7 +1349,7 @@ test-bundled-gems-prepare: $(TEST_RUNNABLE)-test-bundled-gems-prepare
no-test-bundled-gems-prepare: no-test-bundled-gems-precheck
yes-test-bundled-gems-prepare: yes-test-bundled-gems-precheck
$(XRUBY) -C "$(srcdir)" bin/gem install --no-document \
- --install-dir .bundle --conservative "bundler" "minitest:~> 5" 'test-unit' 'rake' 'hoe' 'yard' 'pry' 'packnga' 'rexml'
+ --install-dir .bundle --conservative "bundler" "minitest:~> 5" "test-unit" "rake" "hoe" "yard" "pry" "packnga" "rexml" "json-schema"
PREPARE_BUNDLED_GEMS = test-bundled-gems-prepare
test-bundled-gems: $(TEST_RUNNABLE)-test-bundled-gems
diff --git a/gems/bundled_gems b/gems/bundled_gems
index 713d098..13309a4 100644
--- a/gems/bundled_gems
+++ b/gems/bundled_gems
@@ -4,3 +4,4 @@ rake 13.0.1 https://github.com/ruby/rake
test-unit 3.3.6 https://github.com/test-unit/test-unit
rexml 3.2.4 https://github.com/ruby/rexml
rss 0.2.9 https://github.com/ruby/rss
+rbs 0.12.2 https://github.com/ruby/rbs
diff --git a/tool/test-bundled-gems.rb b/tool/test-bundled-gems.rb
index 5d21311..7f04ff3 100644
--- a/tool/test-bundled-gems.rb
+++ b/tool/test-bundled-gems.rb
@@ -13,10 +13,18 @@ File.foreach("#{gem_dir}/bundled_gems") do |line|
gem = line.split.first
puts "\nTesting the #{gem} gem"
- test_command = "#{ruby} -C #{gem_dir}/src/#{gem} -Ilib #{rake}"
+ test_command = "#{ruby} -C #{gem_dir}/src/#{gem} -Ilib #{rake} test"
+
+ 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")
+ Process.waitpid(pid)
+ test_command << " stdlib_test validate"
+ end
+
puts test_command
pid = Process.spawn(test_command, "#{/mingw|mswin/ =~ RUBY_PLATFORM ? 'new_' : ''}pgroup": true)
- {nil => 60, INT: 30, TERM: 10, KILL: nil}.each do |sig, sec|
+ {nil => 600, INT: 30, TERM: 10, KILL: nil}.each do |sig, sec|
if sig
puts "Sending #{sig} signal"
Process.kill("-#{sig}", pid)