Skip to content
Permalink
Browse files

Fix corpus indeterminsm

* Bump `regexp_parser` dependency
* Simplify `regexp_parser` call side
* Fix corpus checkout indeterminism
* Checkin Gemfile.lock for deterministic builds
* Set circle ruby to 2.3.3
  • Loading branch information
mbj committed Dec 12, 2016
1 parent d4a0131 commit d20d9971a13bcb17084336940add167c27b814db
Showing with 189 additions and 18 deletions.
  1. +0 −1 .gitignore
  2. +167 −0 Gemfile.lock
  3. +1 −4 circle.yml
  4. +1 −1 config/flay.yml
  5. +1 −4 lib/mutant/ast/regexp.rb
  6. +1 −1 mutant.gemspec
  7. +7 −1 spec/integrations.yml
  8. +11 −4 spec/support/corpus.rb
  9. +0 −2 spec/unit/mutant/ast/regexp/parse_spec.rb
@@ -32,7 +32,6 @@ measurements

## BUNDLER
.bundle
Gemfile.lock
Gemfile.*.lock

## PROJECT::SPECIFIC
@@ -0,0 +1,167 @@
PATH
remote: .
specs:
mutant (0.8.12)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
anima (~> 0.3.0)
ast (~> 2.2)
concord (~> 0.1.5)
diff-lcs (~> 1.2)
equalizer (~> 0.0.9)
ice_nine (~> 0.11.1)
memoizable (~> 0.4.2)
morpher (~> 0.2.6)
parallel (~> 1.3)
parser (~> 2.3.1, >= 2.3.1.4)
procto (~> 0.0.2)
regexp_parser (~> 0.4.1)
unparser (~> 0.2.5)
mutant-rspec (0.8.12)
mutant (~> 0.8.12)
rspec-core (>= 3.4.0, < 3.6.0)

GEM
remote: https://rubygems.org/
specs:
abstract_type (0.0.7)
adamantium (0.2.0)
ice_nine (~> 0.11.0)
memoizable (~> 0.4.0)
anima (0.3.0)
abstract_type (~> 0.0.7)
adamantium (~> 0.2)
equalizer (~> 0.0.11)
ast (2.3.0)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
codeclimate-engine-rb (0.4.0)
virtus (~> 1.0)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concord (0.1.5)
adamantium (~> 0.2.0)
equalizer (~> 0.0.9)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devtools (0.1.15)
adamantium (~> 0.2.0)
anima (~> 0.3.0)
concord (~> 0.1.5)
flay (~> 2.8.1)
flog (~> 4.4.0)
mutant (~> 0.8.11)
mutant-rspec (~> 0.8.11)
procto (~> 0.0.3)
rake (~> 11.3.0)
reek (~> 4.5.0)
rspec (~> 3.5.0)
rspec-core (~> 3.5.4)
rspec-its (~> 1.2.0)
rubocop (~> 0.46.0)
simplecov (~> 0.12.0)
yard (~> 0.9.1)
yardstick (~> 0.9.9)
diff-lcs (1.2.5)
docile (1.1.5)
equalizer (0.0.11)
erubis (2.7.0)
ffi (1.9.14)
flay (2.8.1)
erubis (~> 2.7.0)
path_expander (~> 1.0)
ruby_parser (~> 3.0)
sexp_processor (~> 4.0)
flog (4.4.0)
path_expander (~> 1.0)
ruby_parser (~> 3.1, > 3.1.0)
sexp_processor (~> 4.4)
ice_nine (0.11.2)
json (2.0.2)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
morpher (0.2.6)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
anima (~> 0.3.0)
ast (~> 2.2)
concord (~> 0.1.5)
equalizer (~> 0.0.9)
ice_nine (~> 0.11.0)
procto (~> 0.0.2)
parallel (1.10.0)
parser (2.3.3.1)
ast (~> 2.2)
path_expander (1.0.1)
powerpack (0.1.1)
procto (0.0.3)
rainbow (2.1.0)
rake (11.3.0)
reek (4.5.2)
codeclimate-engine-rb (~> 0.4.0)
parser (~> 2.3.1, >= 2.3.1.2)
rainbow (~> 2.0)
regexp_parser (0.4.1)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rubocop (0.46.0)
parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
ruby_parser (3.8.3)
sexp_processor (~> 4.1)
sexp_processor (4.7.0)
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
thread_safe (0.3.5)
unicode-display_width (1.1.1)
unparser (0.2.5)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
concord (~> 0.1.5)
diff-lcs (~> 1.2.5)
equalizer (~> 0.0.9)
parser (~> 2.3.0)
procto (~> 0.0.2)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
yard (0.9.5)
yardstick (0.9.9)
yard (~> 0.8, >= 0.8.7.2)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.10)
devtools (~> 0.1.12)
ffi (~> 1.9.6)
mutant!

BUNDLED WITH
1.13.6
@@ -1,10 +1,7 @@
---
machine:
ruby:
version: '2.3.0'
dependencies:
pre:
- bundle -v | grep -Fx "Bundler version 1.10.6" || gem install bundler --version 1.10.6
version: '2.3.3'
test:
override:
- bundle exec rake ci
@@ -1,3 +1,3 @@
---
threshold: 16
total_score: 1317
total_score: 1321
@@ -12,10 +12,7 @@ module Regexp
#
# @return [Regexp::Expression]
def self.parse(regexp)
::Regexp::Parser.parse(
regexp,
"ruby/#{RUBY_VERSION.split('.').first(2).join('.')}"
)
::Regexp::Parser.parse(regexp)
end

# Check if expression is supported by mapper
@@ -36,7 +36,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency('equalizer', '~> 0.0.9')
gem.add_runtime_dependency('anima', '~> 0.3.0')
gem.add_runtime_dependency('concord', '~> 0.1.5')
gem.add_runtime_dependency('regexp_parser', '~> 0.3.6')
gem.add_runtime_dependency('regexp_parser', '~> 0.4.1')

gem.add_development_dependency('devtools', '~> 0.1.12')
gem.add_development_dependency('bundler', '~> 1.10')
@@ -2,6 +2,7 @@
- name: rubyspec
namespace: Rubyspec
repo_uri: 'https://github.com/ruby/rubyspec.git'
repo_ref: 'origin/master'
mutation_coverage: false
mutation_generation: true
expected_errors:
@@ -16,18 +17,23 @@
- name: regexp_parser
namespace: Regexp
repo_uri: 'https://github.com/ammar/regexp_parser.git'
repo_ref: 'v0.4.1'
mutation_coverage: false
mutation_generation: true
expected_errors: {}
expected_errors:
"Regexp::Syntax::Ruby::V233 does not implement: [escape:codepoint]":
- regexp_parser/test/parser/test_escapes.rb
- name: auom
namespace: AUOM
repo_uri: 'https://github.com/mbj/auom.git'
repo_ref: 'origin/master'
mutation_coverage: true
mutation_generation: true
expected_errors: {}
- name: axiom
namespace: Axiom
repo_uri: 'https://github.com/dkubb/axiom.git'
repo_ref: 'origin/master'
mutation_coverage: false
mutation_generation: true
expected_errors: {}
@@ -37,7 +37,8 @@ class Project
:mutation_generation,
:name,
:namespace,
:repo_uri
:repo_uri,
:repo_ref
)

# Verify mutation coverage
@@ -95,18 +96,23 @@ def verify_mutation_generation
def checkout
return self if noinstall?
TMP.mkdir unless TMP.directory?

if repo_path.exist?
Dir.chdir(repo_path) do
system(%w[git fetch origin])
system(%w[git reset --hard])
system(%w[git clean -f -d -x])
system(%w[git checkout origin/master])
system(%w[git reset --hard])
system(%w[git clean -f -d -x])
end
else
system(%W[git clone #{repo_uri} #{repo_path}])
end

Dir.chdir(repo_path) do
system(%W[git checkout #{repo_ref}])
system(%w[git reset --hard])
system(%w[git clean -f -d -x])
end

self
end
memoize :checkout
@@ -300,6 +306,7 @@ def to_h
s(:guard, s(:primitive, Hash)),
s(:hash_transform,
s(:key_symbolize, :repo_uri, s(:guard, s(:primitive, String))),
s(:key_symbolize, :repo_ref, s(:guard, s(:primitive, String))),
s(:key_symbolize, :name, s(:guard, s(:primitive, String))),
s(:key_symbolize, :namespace, s(:guard, s(:primitive, String))),
s(:key_symbolize, :mutation_coverage,
@@ -1,6 +1,4 @@
RSpec.describe Mutant::AST::Regexp, '.parse' do
before { stub_const('RUBY_VERSION', '2.3.9') }

it 'parses using minor ruby version' do
expect(described_class.parse(/foo/).to_re).to eql(/foo/)
end

0 comments on commit d20d997

Please sign in to comment.
You can’t perform that action at this time.