Allow to run 'make test-bundled-gems BUNDLED_GEMS=csv,rexml' for only testing csv and rexml
This commit is contained in:
parent
24889e44f7
commit
9349e98be2
Notes:
git
2024-11-27 07:45:43 +00:00
@ -6,7 +6,9 @@ BEGIN {
|
||||
color = Colorize.new
|
||||
|
||||
if ARGV.first.start_with?("BUNDLED_GEMS=")
|
||||
bundled_gems = ARGV.shift[13..-1].split(" ")
|
||||
bundled_gems = ARGV.shift[13..-1]
|
||||
sep = bundled_gems.include?(",") ? "," : " "
|
||||
bundled_gems = bundled_gems.split(sep)
|
||||
bundled_gems = nil if bundled_gems.empty?
|
||||
end
|
||||
|
||||
|
@ -11,6 +11,9 @@ github_actions = ENV["GITHUB_ACTIONS"] == "true"
|
||||
allowed_failures = ENV['TEST_BUNDLED_GEMS_ALLOW_FAILURES'] || ''
|
||||
allowed_failures = allowed_failures.split(',').reject(&:empty?)
|
||||
|
||||
# make test-bundled-gems BUNDLED_GEMS=gem1,gem2,gem3
|
||||
bundled_gems = ARGV.first || ''
|
||||
|
||||
colorize = Colorize.new
|
||||
rake = File.realpath("../../.bundle/bin/rake", __FILE__)
|
||||
gem_dir = File.realpath('../../gems', __FILE__)
|
||||
@ -21,7 +24,7 @@ failed = []
|
||||
File.foreach("#{gem_dir}/bundled_gems") do |line|
|
||||
next if /^\s*(?:#|$)/ =~ line
|
||||
gem = line.split.first
|
||||
next unless ARGV.empty? or ARGV.any? {|pat| File.fnmatch?(pat, gem)}
|
||||
next unless bundled_gems.delete_prefix("BUNDLED_GEMS=").split(",").include?(gem)
|
||||
next unless File.directory?("#{gem_dir}/src/#{gem}/test")
|
||||
|
||||
test_command = "#{ruby} -C #{gem_dir}/src/#{gem} #{rake} test"
|
||||
|
Loading…
x
Reference in New Issue
Block a user