Add axiom to corpus test and add noinstall option

Axiom will currently not be killed on CI. Once I merge the parallel
stuff this is feasable.
This commit is contained in:
Markus Schirp 2014-07-11 23:00:13 +00:00
parent c25bb4a195
commit a6875c281c
2 changed files with 39 additions and 9 deletions

View file

@ -37,15 +37,8 @@ describe 'Mutant on ruby corpus' do
def verify_mutation_coverage
checkout
Dir.chdir(repo_path) do
relative = ROOT.relative_path_from(repo_path)
devtools = ROOT.join('Gemfile.devtools').read
devtools << "gem 'mutant', path: '#{relative}'\n"
devtools << "gem 'mutant-rspec', path: '#{relative}'\n"
File.write(repo_path.join('Gemfile.devtools'), devtools)
lockfile = repo_path.join('Gemfile.lock')
lockfile.delete if lockfile.exist?
Bundler.with_clean_env do
system('bundle install')
install_mutant
system(%W[bundle exec mutant -I lib -r #{name} --score #{expect_coverage} --use rspec #{namespace}*])
end
end
@ -96,6 +89,7 @@ describe 'Mutant on ruby corpus' do
# @api private
#
def checkout
return self if noinstall?
TMP.mkdir unless TMP.directory?
if repo_path.exist?
Dir.chdir(repo_path) do
@ -111,6 +105,25 @@ describe 'Mutant on ruby corpus' do
private
# Install mutant
#
# @return [undefined]
#
# @api private
#
def install_mutant
return if noinstall?
relative = ROOT.relative_path_from(repo_path)
devtools = ROOT.join('Gemfile.devtools').read
devtools << "gem 'mutant', path: '#{relative}'\n"
devtools << "gem 'mutant-rspec', path: '#{relative}'\n"
File.write(repo_path.join('Gemfile.devtools'), devtools)
lockfile = repo_path.join('Gemfile.lock')
lockfile.delete if lockfile.exist?
system('bundle install')
end
# Return repository path
#
# @return [Pathname]
@ -121,6 +134,16 @@ describe 'Mutant on ruby corpus' do
TMP.join(name)
end
# Test if installation should be skipped
#
# @return [Boolean]
#
# @api private
#
def noinstall?
ENV.key?('NOINSTALL')
end
# Print start progress
#
# @param [Pathname] path
@ -203,7 +226,7 @@ describe 'Mutant on ruby corpus' do
end
Project::ALL.select(&:mutation_coverage).each do |project|
specify "#{project.name} does have expected mutaiton coverage" do
specify "#{project.name} does have expected mutation coverage" do
project.verify_mutation_coverage
end
end

View file

@ -32,3 +32,10 @@
mutation_generation: true
exclude: []
expect_coverage: 100.0
- name: axiom
namespace: Axiom
repo_uri: 'https://github.com/dkubb/axiom.git'
mutation_coverage: false
mutation_generation: true
exclude: []
expect_coverage: 100.0