2013-07-29 20:17:04 -04:00
|
|
|
# encoding: utf-8
|
|
|
|
|
2013-12-29 17:36:55 -05:00
|
|
|
require 'devtools'
|
2013-07-29 20:17:04 -04:00
|
|
|
|
2013-12-29 17:36:55 -05:00
|
|
|
Devtools.init_rake_tasks
|
2014-04-22 18:11:02 -04:00
|
|
|
|
2014-10-30 10:32:52 -04:00
|
|
|
# Frequent lookups in MRI make mutation analysis getting stuck on CI
|
|
|
|
# See: https://github.com/mbj/mutant/issues/265
|
|
|
|
if ENV['CI']
|
2014-05-07 14:15:39 -04:00
|
|
|
Rake.application.load_imports
|
|
|
|
|
2014-04-22 18:11:02 -04:00
|
|
|
task('metrics:mutant').clear
|
|
|
|
namespace :metrics do
|
|
|
|
task :mutant => :coverage do
|
2014-10-30 10:32:52 -04:00
|
|
|
$stderr.puts 'Mutant self test via zombie not active on CI'
|
2014-04-22 18:11:02 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2014-06-02 11:15:04 -04:00
|
|
|
|
|
|
|
desc 'Generate mutation operator listing'
|
|
|
|
task :list do
|
|
|
|
require 'mutant'
|
|
|
|
# TODO: Add a nice public interface
|
|
|
|
registry = Mutant::Mutator::Registry.send(:registry)
|
|
|
|
registry.keys.select do |key|
|
|
|
|
key.is_a?(Symbol)
|
|
|
|
end.sort.each do |type|
|
|
|
|
mutator = registry.fetch(type)
|
|
|
|
puts '%-18s: %s' % [type, mutator.name.sub(/\AMutant::Mutator::Node::/, '')]
|
|
|
|
end
|
|
|
|
end
|