-
Notifications
You must be signed in to change notification settings - Fork 86
/
Rakefile
executable file
·40 lines (32 loc) · 946 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env rake
require 'bundler/gem_tasks'
require 'coveralls/rake/task'
Coveralls::RakeTask.new
task default: :split_test
desc 'run parallel tests'
task :pspec do
dirname = File.expand_path(File.dirname(__FILE__))
cmd = "bundle exec parallel_rspec -n #{ENV['N'] || 10} --runtime-log '#{dirname}/spec/weights.txt' #{dirname}/spec"
abort unless system(cmd)
end
desc 'run parallel split tests'
task :split_test do
dirname = File.expand_path(File.dirname(__FILE__))
ENV['PARALLEL_SPLIT_TEST_PROCESSES'] = (ENV['N'] || 10).to_s
cmd = "bundle exec parallel_split_test #{dirname}/spec"
abort unless system(cmd)
end
task :remove_coverage do
require 'fileutils'
FileUtils.rm_rf(File.expand_path(File.join(File.dirname(__FILE__), %w[coverage])))
end
task :env do
require 'bundler/setup'
require 'eye'
Eye::Controller
Eye::Process
end
desc 'graph'
task graph: :env do
StateMachine::Machine.draw('Eye::Process')
end