1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[EXPERIMENTAL] Added test-bundled-gems task.

`test-bundled-gems` invoke test suite of bundled gems with
  build environment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2017-10-21 09:50:36 +00:00
parent d5b34b5331
commit 6faa0e12b0
5 changed files with 41 additions and 8 deletions

1
.gitignore vendored
View file

@ -180,6 +180,7 @@ lcov*.info
# /gems
/gems/*.gem
/gems/src
/gems/*-*
# /spec/bundler

View file

@ -474,6 +474,20 @@ ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP)
enc/encinit.$(OBJEXT): enc/encinit.c $(SETUP)
test-bundled-gems-precheck: $(arch)-fake.rb programs
yes-test-bundled-gems-prepare: test-bundled-gems-precheck
$(Q) $(BASERUBY) $(srcdir)/tool/fetch-bundled_gems.rb $(srcdir)
$(XRUBY) -C "$(srcdir)" bin/gem install --no-ri --no-rdoc \
--install-dir spec/rspec --conservative 'minitest:~> 5' 'test-unit' 'rake' 'hoe' 'yard' 'packnga'
test-bundled-gems: $(TEST_RUNNABLE)-test-bundled-gems
yes-test-bundled-gems: yes-test-bundled-gems-prepare
for gem in minitest test-unit xmlrpc net-telnet did_you_mean power_assert rake; do \
$(XRUBY) -C $(srcdir)/gems/src/$$gem -Ilib ../../../spec/rspec/bin/rake; \
done
no-test-bundled-gems:
test-bundler-precheck: $(arch)-fake.rb programs
yes-test-bundler-prepare: test-bundler-precheck

View file

@ -1,7 +1,7 @@
did_you_mean 1.1.2
minitest 5.10.3
net-telnet 0.1.1
power_assert 1.1.0
rake 12.1.0
test-unit 3.2.5
xmlrpc 0.3.0
did_you_mean 1.1.2 https://github.com/yuki24/did_you_mean
minitest 5.10.3 https://github.com/seattlerb/minitest
net-telnet 0.1.1 https://github.com/ruby/net-telnet
power_assert 1.1.0 https://github.com/k-tsj/power_assert
rake 12.1.0 https://github.com/ruby/rake
test-unit 3.2.5 https://github.com/test-unit/test-unit
xmlrpc 0.3.0 https://github.com/ruby/xmlrpc

View file

@ -0,0 +1,17 @@
require 'fileutils'
File.readlines("#{ARGV[0]}/gems/bundled_gems").each do |gem|
n, v, u = gem.split
v = "v" + v
case n
when "minitest"
v = "master"
when "test-unit"
v = v[1..-1]
end
FileUtils.mkdir_p "#{ARGV[0]}/gems/src"
`#{ARGV[0]}/tool/git-refresh -C #{ARGV[0]}/gems/src --branch #{v} #{u} #{n}`
end

View file

@ -369,7 +369,8 @@ _touch-unicode-files:
if File.exist?("gems/bundled_gems")
gems = Dir.glob("gems/*.gem")
gems -= File.readlines("gems/bundled_gems").map {|line|
'gems/'+line.split(' ').join('-')+'.gem'
n, v, _ = line.split(' ')
"gems/#{n}-#{v}.gem"
}
FileUtils.rm_f(gems)
else