78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# File 'lib/onceover/runner.rb', line 78
def run_spec!
Dir.chdir(@repo.tempdir) do
unless logger.level.zero?
previous_rubyopt = ENV['RUBYOPT']
ENV['RUBYOPT'] = ENV['RUBYOPT'].to_s + ' -W0'
end
if @config.opts[:parallel]
logger.debug "Running #{@command_prefix}rake parallel_spec from #{@repo.tempdir}"
result = run_command(@command_prefix.strip.split, 'rake', 'parallel_spec')
else
require 'io/console'
logger.debug "Running #{@command_prefix}rake spec_standalone from #{@repo.tempdir}"
result = run_command(@command_prefix.strip.split, 'rake', 'spec_standalone')
end
unless logger.level.zero?
ENV['RUBYOPT'] = previous_rubyopt
end
if @config.formatters.include? 'OnceoverFormatterParallel'
require 'onceover/rspec/formatters'
formatter = OnceoverFormatterParallel.new(STDOUT)
formatter.output_results("#{repo.tempdir}/parallel")
end
exit result.status.exitstatus
end
end
|