Rakefile in rbs-3.6.1 vs Rakefile in rbs-3.7.0.dev.1

- old
+ new

@@ -61,11 +61,16 @@ libs = FileList["stdlib/*"].map {|path| File.basename(path).to_s } # Skip RBS validation because Ruby CI runs without rubygems case skip_rbs_validation = ENV["SKIP_RBS_VALIDATION"] when nil - libs << "rbs" + begin + Gem::Specification.find_by_name("rbs") + libs << "rbs" + rescue Gem::MissingSpecError + STDERR.puts "🚨🚨🚨🚨 Skipping `rbs` gem because it's not found" + end when "true" # Skip else STDERR.puts "🚨🚨🚨🚨 SKIP_RBS_VALIDATION is expected to be `true` or unset, given `#{skip_rbs_validation}` 🚨🚨🚨🚨" libs << "rbs" @@ -84,9 +89,14 @@ task :stdlib_test => :compile do test_files = FileList["test/stdlib/**/*_test.rb"].reject do |path| path =~ %r{Ractor} || path =~ %r{Encoding} end + + if ENV["RANDOMIZE_STDLIB_TEST_ORDER"] == "true" + test_files.shuffle! + end + sh "#{ruby} -Ilib #{bin}/test_runner.rb #{test_files.join(' ')}" # TODO: Ractor tests need to be run in a separate process sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Ractor_test.rb" sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Encoding_test.rb" end