diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-06-27 15:51:35 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-06-27 15:51:35 +0200 |
commit | 64d8c0815e6ab042e8a67a670bda9f34404fa662 (patch) | |
tree | 7f84e2363d65d78ab3cb1391f25e7f805a1f24f4 | |
parent | 609ac6ee2c30ec8d91f3a97648565cf0bcaa3b0d (diff) | |
download | ruby-64d8c0815e6ab042e8a67a670bda9f34404fa662.tar.gz |
Update to ruby/mspec@6cb1f10
-rw-r--r-- | spec/mspec/README.md | 2 | ||||
-rw-r--r-- | spec/mspec/lib/mspec/utils/options.rb | 2 | ||||
-rw-r--r-- | spec/mspec/tool/sync/sync-rubyspec.rb | 3 | ||||
-rwxr-xr-x | spec/mspec/tool/tag_from_output.rb | 6 |
4 files changed, 8 insertions, 5 deletions
diff --git a/spec/mspec/README.md b/spec/mspec/README.md index 86ee369e46..d4054bcf0f 100644 --- a/spec/mspec/README.md +++ b/spec/mspec/README.md @@ -1,5 +1,3 @@ -[![Build Status](https://travis-ci.org/ruby/mspec.svg?branch=master)](https://travis-ci.org/ruby/mspec) - ## Overview MSpec is a specialized framework that is syntax-compatible with RSpec 2 for diff --git a/spec/mspec/lib/mspec/utils/options.rb b/spec/mspec/lib/mspec/utils/options.rb index cb466f6a83..bef1dbdd2e 100644 --- a/spec/mspec/lib/mspec/utils/options.rb +++ b/spec/mspec/lib/mspec/utils/options.rb @@ -399,7 +399,7 @@ class MSpecOptions end def obj.load file = MSpec.file - STDERR.print "\n#{file.ljust(@width)}" + STDERR.print "\n#{file.ljust(@width)}\n" end MSpec.register :start, obj MSpec.register :load, obj diff --git a/spec/mspec/tool/sync/sync-rubyspec.rb b/spec/mspec/tool/sync/sync-rubyspec.rb index 8a66217e4e..163dde604b 100644 --- a/spec/mspec/tool/sync/sync-rubyspec.rb +++ b/spec/mspec/tool/sync/sync-rubyspec.rb @@ -35,6 +35,9 @@ BRIGHT_RED = "\e[31;1m" BRIGHT_YELLOW = "\e[33;1m" RESET = "\e[0m" +# git filter-branch --subdirectory-filter works fine for our use case +ENV['FILTER_BRANCH_SQUELCH_WARNING'] = '1' + class RubyImplementation attr_reader :name diff --git a/spec/mspec/tool/tag_from_output.rb b/spec/mspec/tool/tag_from_output.rb index 43fc4808bc..fba52ec26c 100755 --- a/spec/mspec/tool/tag_from_output.rb +++ b/spec/mspec/tool/tag_from_output.rb @@ -26,10 +26,11 @@ output.slice_before(NUMBER).select { |number, error_line, *rest| next end spec_file = spec_file[SPEC_FILE, 1] - prefix = spec_file.index('spec/ruby') + prefix = spec_file.index('spec/ruby/') || spec_file.index('spec/truffle/') spec_file = spec_file[prefix..-1] - tags_file = spec_file.sub('spec/ruby/', "#{tags_dir}/").sub(/_spec\.rb$/, '_tags.txt') + tags_file = spec_file.sub('spec/ruby/', "#{tags_dir}/").sub('spec/truffle/', "#{tags_dir}/truffle/") + tags_file = tags_file.sub(/_spec\.rb$/, '_tags.txt') dir = File.dirname(tags_file) Dir.mkdir(dir) unless Dir.exist?(dir) @@ -37,6 +38,7 @@ output.slice_before(NUMBER).select { |number, error_line, *rest| tag_line = "fails:#{description}" lines = File.exist?(tags_file) ? File.readlines(tags_file, chomp: true) : [] unless lines.include?(tag_line) + puts tags_file File.write(tags_file, (lines + [tag_line]).join("\n") + "\n") end } |