diff options
Diffstat (limited to 'tool/test-bundled-gems.rb')
-rw-r--r-- | tool/test-bundled-gems.rb | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/tool/test-bundled-gems.rb b/tool/test-bundled-gems.rb index 26ad265608..eeec1d7aed 100644 --- a/tool/test-bundled-gems.rb +++ b/tool/test-bundled-gems.rb @@ -15,8 +15,7 @@ ENV["GEM_PATH"] = [File.realpath('.bundle'), File.realpath('../.bundle', __dir__ colorize = Colorize.new rake = File.realpath("../../.bundle/bin/rake", __FILE__) gem_dir = File.realpath('../../gems', __FILE__) -dummy_rake_compiler_dir = File.realpath('../dummy-rake-compiler', __FILE__) -rubylib = [File.expand_path(dummy_rake_compiler_dir), ENV["RUBYLIB"]].compact.join(File::PATH_SEPARATOR) +rubylib = [gem_dir+'/lib', ENV["RUBYLIB"]].compact.join(File::PATH_SEPARATOR) exit_code = 0 ruby = ENV['RUBY'] || RbConfig.ruby failed = [] @@ -24,25 +23,41 @@ File.foreach("#{gem_dir}/bundled_gems") do |line| next if /^\s*(?:#|$)/ =~ line gem = line.split.first next if ARGV.any? {|pat| !File.fnmatch?(pat, gem)} - puts "#{github_actions ? "##[group]" : "\n"}Testing the #{gem} gem" + # 93(bright yellow) is copied from .github/workflows/mingw.yml + puts "#{github_actions ? "::group::\e\[93m" : "\n"}Testing the #{gem} gem#{github_actions ? "\e\[m" : ""}" test_command = "#{ruby} -C #{gem_dir}/src/#{gem} #{rake} test" first_timeout = 600 # 10min toplib = gem case gem + when "resolv-replace" + # Skip test suite + next when "typeprof" when "rbs" - test_command << " stdlib_test validate RBS_SKIP_TESTS=#{__dir__}/rbs_skip_tests" + # TODO: We should skip test file instead of test class/methods + skip_test_files = %w[ + ] + + skip_test_files.each do |file| + path = "#{gem_dir}/src/#{gem}/#{file}" + File.unlink(path) if File.exist?(path) + end + + test_command << " stdlib_test validate RBS_SKIP_TESTS=#{__dir__}/rbs_skip_tests SKIP_RBS_VALIDATION=true" first_timeout *= 3 when "debug" # Since debug gem requires debug.so in child processes without - # acitvating the gem, we preset necessary paths in RUBYLIB + # activating the gem, we preset necessary paths in RUBYLIB # environment variable. load_path = true + when "test-unit" + test_command = "#{ruby} -C #{gem_dir}/src/#{gem} test/run-test.rb" + when /\Anet-/ toplib = gem.tr("-", "/") @@ -76,7 +91,7 @@ File.foreach("#{gem_dir}/bundled_gems") do |line| break end - print "##[endgroup]\n" if github_actions + print "::endgroup::\n" if github_actions unless $?.success? mesg = "Tests failed " + |