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
113
114
115
116
117
118
|
# File 'lib/buildr/java/bdd.rb', line 87
def run(tests, dependencies)
maybe_install_jruby
dependencies |= [task.compile.target.to_s]
spec_dir = task.project.path_to(:source, :spec, :ruby)
report_dir = task.report_to.to_s
rm_rf report_dir
mkdir_p report_dir
ENV['CI_REPORTS'] = report_dir
runner = runner_config
runner.content = runner_content(binding)
Buildr.write(runner.file, runner.content)
rm_f runner.result
if RUBY_PLATFORM[/java/] && !options.fork
runtime = new_runtime
runtime.getObject.java.lang.System.getProperties().putAll(options[:properties] || {})
runtime.getLoadService.require runner.file
else
cmd_options = task.options.only(:properties, :java_args)
cmd_options.update(:classpath => dependencies, :project => task.project)
jruby runner.file, tests, cmd_options
end
result = YAML.load(File.read(runner.result))
if Exception === result
raise [result.message, result.backtrace].flatten.join("\n")
end
tests - result.failed
end
|