vic-buildr 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +42 -11
- data/Rakefile +5 -3
- data/_buildr +9 -31
- data/addon/buildr/cobertura.rb +5 -218
- data/addon/buildr/drb.rb +281 -0
- data/addon/buildr/emma.rb +5 -220
- data/addon/buildr/nailgun.rb +94 -686
- data/bin/buildr +0 -9
- data/buildr.gemspec +6 -6
- data/doc/images/favicon.png +0 -0
- data/doc/pages/contributing.textile +6 -4
- data/doc/pages/download.textile +11 -0
- data/doc/pages/extending.textile +2 -2
- data/doc/pages/getting_started.textile +4 -4
- data/doc/pages/index.textile +8 -11
- data/doc/pages/more_stuff.textile +50 -22
- data/doc/pages/packaging.textile +1 -1
- data/doc/pages/projects.textile +2 -2
- data/doc/pages/settings_profiles.textile +2 -2
- data/doc/pages/testing.textile +1 -1
- data/doc/pages/whats_new.textile +12 -0
- data/doc/site.haml +1 -0
- data/lib/buildr.rb +2 -4
- data/lib/buildr/core.rb +2 -0
- data/lib/buildr/core/application.rb +304 -149
- data/lib/buildr/core/checks.rb +3 -131
- data/lib/buildr/core/common.rb +0 -4
- data/lib/buildr/core/compile.rb +1 -7
- data/lib/buildr/core/environment.rb +0 -3
- data/lib/buildr/core/filter.rb +7 -3
- data/lib/buildr/core/generate.rb +50 -52
- data/lib/buildr/core/help.rb +2 -1
- data/lib/buildr/core/osx.rb +49 -0
- data/lib/buildr/core/progressbar.rb +1 -1
- data/lib/buildr/core/project.rb +7 -9
- data/lib/buildr/core/test.rb +4 -4
- data/lib/buildr/core/transports.rb +13 -30
- data/lib/buildr/core/util.rb +8 -3
- data/lib/buildr/groovy/bdd.rb +1 -0
- data/lib/buildr/groovy/compiler.rb +1 -1
- data/lib/buildr/ide/eclipse.rb +30 -20
- data/lib/buildr/ide/idea.rb +3 -2
- data/lib/buildr/ide/idea7x.rb +4 -2
- data/lib/buildr/java/ant.rb +1 -1
- data/lib/buildr/java/bdd.rb +9 -5
- data/lib/buildr/java/cobertura.rb +236 -0
- data/lib/buildr/java/commands.rb +2 -1
- data/lib/buildr/java/emma.rb +238 -0
- data/lib/buildr/java/jtestr_runner.rb.erb +2 -0
- data/lib/buildr/java/packaging.rb +6 -2
- data/lib/buildr/java/pom.rb +0 -4
- data/lib/buildr/java/test_result.rb +45 -15
- data/lib/buildr/java/tests.rb +14 -9
- data/lib/buildr/packaging.rb +5 -2
- data/lib/buildr/packaging/archive.rb +488 -0
- data/lib/buildr/packaging/artifact.rb +36 -7
- data/lib/buildr/packaging/artifact_namespace.rb +2 -2
- data/lib/buildr/packaging/gems.rb +3 -3
- data/lib/buildr/packaging/package.rb +1 -1
- data/lib/buildr/packaging/tar.rb +85 -3
- data/lib/buildr/packaging/version_requirement.rb +172 -0
- data/lib/buildr/packaging/zip.rb +24 -682
- data/lib/buildr/packaging/ziptask.rb +313 -0
- data/lib/buildr/scala/compiler.rb +1 -1
- data/lib/buildr/scala/tests.rb +2 -2
- data/rakelib/apache.rake +58 -8
- data/rakelib/package.rake +4 -1
- data/rakelib/rspec.rake +2 -2
- data/rakelib/rubyforge.rake +6 -3
- data/rakelib/scm.rake +1 -1
- data/rakelib/setup.rake +0 -5
- data/rakelib/stage.rake +4 -1
- data/spec/addon/drb_spec.rb +328 -0
- data/spec/core/application_spec.rb +29 -22
- data/spec/core/build_spec.rb +8 -0
- data/spec/core/checks_spec.rb +293 -311
- data/spec/core/common_spec.rb +8 -2
- data/spec/core/compile_spec.rb +17 -1
- data/spec/core/generate_spec.rb +33 -0
- data/spec/core/project_spec.rb +18 -10
- data/spec/core/test_spec.rb +24 -1
- data/spec/ide/eclipse_spec.rb +96 -28
- data/spec/java/ant.rb +5 -0
- data/spec/java/bdd_spec.rb +4 -4
- data/spec/{addon → java}/cobertura_spec.rb +3 -3
- data/spec/{addon → java}/emma_spec.rb +3 -3
- data/spec/java/java_spec.rb +9 -1
- data/spec/java/packaging_spec.rb +19 -2
- data/spec/{addon → java}/test_coverage_spec.rb +7 -1
- data/spec/java/tests_spec.rb +5 -0
- data/spec/packaging/archive_spec.rb +1 -1
- data/spec/{core → packaging}/artifact_namespace_spec.rb +2 -2
- data/spec/packaging/artifact_spec.rb +46 -5
- data/spec/packaging/packaging_spec.rb +1 -1
- data/spec/sandbox.rb +16 -14
- data/spec/spec_helpers.rb +26 -3
- metadata +20 -11
- data/lib/buildr/core/application_cli.rb +0 -139
data/lib/buildr/java/commands.rb
CHANGED
@@ -83,7 +83,8 @@ module Java
|
|
83
83
|
end
|
84
84
|
cmd_args << '-source' << options[:source] if options[:source]
|
85
85
|
classpath = classpath_from(options)
|
86
|
-
Java.tools_jar
|
86
|
+
tools = Java.tools_jar
|
87
|
+
classpath << tools if tools
|
87
88
|
cmd_args << '-classpath' << classpath.join(File::PATH_SEPARATOR) unless classpath.empty?
|
88
89
|
cmd_args += files
|
89
90
|
unless Buildr.application.options.dryrun
|
@@ -0,0 +1,238 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with this
|
3
|
+
# work for additional information regarding copyright ownership. The ASF
|
4
|
+
# licenses this file to you under the Apache License, Version 2.0 (the
|
5
|
+
# "License"); you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
# License for the specific language governing permissions and limitations under
|
14
|
+
# the License.
|
15
|
+
|
16
|
+
|
17
|
+
require 'buildr/java'
|
18
|
+
|
19
|
+
|
20
|
+
module Buildr
|
21
|
+
|
22
|
+
# Provides the <code>emma:html</code> and <code>emma:xml</code> tasks.
|
23
|
+
# Require explicitly using <code>require "buildr/emma"</code>.
|
24
|
+
#
|
25
|
+
# You can generate emma reports for a single project
|
26
|
+
# using the project name as prefix:
|
27
|
+
#
|
28
|
+
# project_name:emma:html
|
29
|
+
#
|
30
|
+
# You can also specify which classes to include/exclude from instrumentation by
|
31
|
+
# passing a class name regexp to the <code>emma.include</code> or
|
32
|
+
# <code>emma.exclude</code> methods.
|
33
|
+
#
|
34
|
+
# define 'someModule' do
|
35
|
+
# emma.include 'some.package.*'
|
36
|
+
# emma.exclude 'some.foo.util.SimpleUtil'
|
37
|
+
# end
|
38
|
+
module Emma
|
39
|
+
|
40
|
+
class << self
|
41
|
+
|
42
|
+
REQUIRES = ['emma:emma_ant:jar:2.0.5312', 'emma:emma:jar:2.0.5312'] unless const_defined?('REQUIRES')
|
43
|
+
|
44
|
+
def requires()
|
45
|
+
@requires ||= Buildr.artifacts(REQUIRES).each(&:invoke).map(&:to_s)
|
46
|
+
end
|
47
|
+
|
48
|
+
def report_to format=nil
|
49
|
+
File.expand_path('reports/emma')
|
50
|
+
end
|
51
|
+
|
52
|
+
def data_file()
|
53
|
+
File.join(report_to, 'coverage.es')
|
54
|
+
end
|
55
|
+
|
56
|
+
def ant
|
57
|
+
Buildr.ant 'emma' do |ant|
|
58
|
+
ant.taskdef :classpath=>requires.join(File::PATH_SEPARATOR), :resource=>'emma_ant.properties'
|
59
|
+
ant.emma :verbosity=>(Buildr.application.options.trace ? 'verbose' : 'warning') do
|
60
|
+
yield ant
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
class EmmaConfig # :nodoc:
|
67
|
+
|
68
|
+
def initialize(project)
|
69
|
+
@project = project
|
70
|
+
end
|
71
|
+
|
72
|
+
attr_reader :project
|
73
|
+
private :project
|
74
|
+
|
75
|
+
attr_writer :metadata_file, :coverage_file, :instrumented_dir, :report_dir
|
76
|
+
|
77
|
+
def coverage_file
|
78
|
+
@coverage_file ||= File.join(report_dir, 'coverage.ec')
|
79
|
+
end
|
80
|
+
|
81
|
+
def metadata_file
|
82
|
+
@metadata_file ||= File.join(report_dir, 'coverage.em')
|
83
|
+
end
|
84
|
+
|
85
|
+
def instrumented_dir
|
86
|
+
@instrumented_dir ||= project.path_to(:target, :instrumented, :classes)
|
87
|
+
end
|
88
|
+
|
89
|
+
def report_dir
|
90
|
+
@report_dir ||= project.path_to(:reports, :emma)
|
91
|
+
end
|
92
|
+
|
93
|
+
def report_to format
|
94
|
+
report_dir
|
95
|
+
end
|
96
|
+
|
97
|
+
# :call-seq:
|
98
|
+
# project.emma.include(*classPatterns)
|
99
|
+
#
|
100
|
+
def include(*classPatterns)
|
101
|
+
includes.push(*classPatterns)
|
102
|
+
self
|
103
|
+
end
|
104
|
+
|
105
|
+
def includes
|
106
|
+
@includeClasses ||= []
|
107
|
+
end
|
108
|
+
|
109
|
+
# :call-seq:
|
110
|
+
# project.emma.exclude(*classPatterns)
|
111
|
+
#
|
112
|
+
def exclude(*classPatterns)
|
113
|
+
excludes.push(*classPatterns)
|
114
|
+
self
|
115
|
+
end
|
116
|
+
|
117
|
+
def excludes
|
118
|
+
@excludeClasses ||= []
|
119
|
+
end
|
120
|
+
|
121
|
+
def sources
|
122
|
+
project.compile.sources
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
module EmmaExtension # :nodoc:
|
127
|
+
include Buildr::Extension
|
128
|
+
|
129
|
+
def emma
|
130
|
+
@emma_config ||= EmmaConfig.new(self)
|
131
|
+
end
|
132
|
+
|
133
|
+
after_define do |project|
|
134
|
+
emma = project.emma
|
135
|
+
|
136
|
+
namespace 'emma' do
|
137
|
+
unless project.compile.target.nil?
|
138
|
+
# Instrumented bytecode goes in a different directory. This task creates before running the test
|
139
|
+
# cases and monitors for changes in the generate bytecode.
|
140
|
+
instrumented = project.file(emma.instrumented_dir => project.compile.target) do |task|
|
141
|
+
unless project.compile.sources.empty?
|
142
|
+
info "Instrumenting classes with emma metadata file #{emma.metadata_file}"
|
143
|
+
Emma.ant do |ant|
|
144
|
+
ant.instr :instrpath=>project.compile.target.to_s, :destdir=>task.to_s, :metadatafile=>emma.metadata_file do
|
145
|
+
ant.filter :includes=>emma.includes.join(', ') unless emma.includes.empty?
|
146
|
+
ant.filter :excludes=>emma.excludes.join(', ') unless emma.excludes.empty?
|
147
|
+
end
|
148
|
+
end
|
149
|
+
touch task.to_s, :verbose=>false
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
task 'instrument' => instrumented
|
154
|
+
|
155
|
+
# We now have two target directories with bytecode.
|
156
|
+
project.test.dependencies.unshift emma.instrumented_dir
|
157
|
+
project.test.with Emma.requires
|
158
|
+
project.test.options[:properties]["emma.coverage.out.file"] = emma.coverage_file
|
159
|
+
|
160
|
+
[:xml, :html].each do |format|
|
161
|
+
task format => ['instrument', 'test'] do
|
162
|
+
missing_required_files = [emma.metadata_file, emma.coverage_file].reject { |f| File.exist?(f) }
|
163
|
+
if missing_required_files.empty?
|
164
|
+
info "Creating test coverage reports in #{emma.report_dir}"
|
165
|
+
mkdir_p emma.report_dir, :verbose=>false
|
166
|
+
Emma.ant do |ant|
|
167
|
+
ant.report do
|
168
|
+
ant.infileset :file=>emma.metadata_file
|
169
|
+
ant.infileset :file=>emma.coverage_file
|
170
|
+
ant.send format, :outfile=>File.join(emma.report_to(format),"coverage.#{format}")
|
171
|
+
ant.sourcepath do
|
172
|
+
emma.sources.flatten.each do |src|
|
173
|
+
ant.dirset(:dir=>src.to_s) if File.exist?(src.to_s)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
else
|
179
|
+
info "No test coverage report for #{project}. Missing: #{missing_required_files.join(', ')}"
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
project.clean do
|
187
|
+
rm_rf [emma.report_dir, emma.coverage_file, emma.metadata_file, emma.instrumented_dir], :verbose=>false
|
188
|
+
end
|
189
|
+
|
190
|
+
end
|
191
|
+
|
192
|
+
end
|
193
|
+
|
194
|
+
class Buildr::Project
|
195
|
+
include EmmaExtension
|
196
|
+
end
|
197
|
+
|
198
|
+
namespace "emma" do
|
199
|
+
|
200
|
+
Project.local_task('instrument') { |name| "Instrumenting #{name}" }
|
201
|
+
|
202
|
+
[:xml, :html].each do |format|
|
203
|
+
desc "Run the test cases and produce code coverage reports in #{format}"
|
204
|
+
task format => ['instrument', 'test'] do
|
205
|
+
info "Creating test coverage reports in #{format}"
|
206
|
+
mkdir_p report_to(format), :verbose=>false
|
207
|
+
Emma.ant do |ant|
|
208
|
+
ant.merge :outfile=>data_file do
|
209
|
+
Buildr.projects.each do |project|
|
210
|
+
[project.emma.metadata_file, project.emma.coverage_file].each do |data_file|
|
211
|
+
ant.fileset :file=>data_file if File.exist?(data_file)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
ant.report do
|
216
|
+
ant.infileset :file=>data_file
|
217
|
+
ant.send format, :outfile=>File.join(report_to(format), "coverage.#{format}")
|
218
|
+
ant.sourcepath do
|
219
|
+
Buildr.projects.map(&:emma).map(&:sources).flatten.map(&:to_s).each do |src|
|
220
|
+
ant.dirset :dir=>src if File.exist?(src)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
task :clean do
|
229
|
+
rm_rf [report_to, data_file], :verbose=>false
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
task :clean do
|
234
|
+
task('emma:clean').invoke if Dir.pwd == Rake.application.original_dir
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
238
|
+
end
|
@@ -107,6 +107,8 @@ rescue => e
|
|
107
107
|
Buildr::TestFramework::TestResult::Error.dump_yaml('<%= runner.result %>', e) rescue \
|
108
108
|
puts "-[--- ERROR ---]-", e.class, e.message, *e.backtrace
|
109
109
|
end
|
110
|
+
|
111
|
+
exit 0 # let buildr find the erros from the result yaml
|
110
112
|
|
111
113
|
# Local Variables:
|
112
114
|
# mode: ruby
|
@@ -25,7 +25,7 @@ module Buildr
|
|
25
25
|
|
26
26
|
class Manifest
|
27
27
|
|
28
|
-
STANDARD_HEADER =
|
28
|
+
STANDARD_HEADER = { 'Manifest-Version'=>'1.0', 'Created-By'=>'Buildr' }
|
29
29
|
LINE_SEPARATOR = /\r\n|\n|\r[^\n]/ #:nodoc:
|
30
30
|
SECTION_SEPARATOR = /(#{LINE_SEPARATOR}){2}/ #:nodoc:
|
31
31
|
|
@@ -97,6 +97,10 @@ module Buildr
|
|
97
97
|
else
|
98
98
|
fail 'Invalid manifest, expecting Hash, Array, file name/task or proc/method.'
|
99
99
|
end
|
100
|
+
# Add Manifest-Version and Created-By, if not specified.
|
101
|
+
STANDARD_HEADER.each do |name, value|
|
102
|
+
sections.first[name] ||= value
|
103
|
+
end
|
100
104
|
end
|
101
105
|
|
102
106
|
# The sections of this manifest.
|
@@ -171,7 +175,7 @@ module Buildr
|
|
171
175
|
@manifest_tmp = Tempfile.new('MANIFEST.MF')
|
172
176
|
self.manifest = File.read(manifest.to_s) if String === manifest || Rake::Task === manifest
|
173
177
|
self.manifest = Manifest.new(manifest) unless Manifest === manifest
|
174
|
-
|
178
|
+
#@manifest_tmp.write Manifest::STANDARD_HEADER
|
175
179
|
@manifest_tmp.write manifest.to_s
|
176
180
|
@manifest_tmp.write "\n"
|
177
181
|
@manifest_tmp.rewind
|
data/lib/buildr/java/pom.rb
CHANGED
@@ -13,7 +13,6 @@
|
|
13
13
|
# License for the specific language governing permissions and limitations under
|
14
14
|
# the License.
|
15
15
|
|
16
|
-
require 'yaml'
|
17
16
|
|
18
17
|
module Buildr #:nodoc:
|
19
18
|
module TestFramework
|
@@ -27,6 +26,7 @@ module Buildr #:nodoc:
|
|
27
26
|
def initialize(message, backtrace)
|
28
27
|
@message = message
|
29
28
|
@backtrace = backtrace
|
29
|
+
set_backtrace backtrace
|
30
30
|
end
|
31
31
|
|
32
32
|
def self.dump_yaml(file, e)
|
@@ -59,9 +59,12 @@ module Buildr #:nodoc:
|
|
59
59
|
def initialize(options, where)
|
60
60
|
@options = options
|
61
61
|
@where = where
|
62
|
+
@result = Hash.new
|
63
|
+
@result[:succeeded] = []
|
64
|
+
@result[:failed] = []
|
62
65
|
end
|
63
66
|
|
64
|
-
%w[ example_started
|
67
|
+
%w[ example_started
|
65
68
|
start_dump dump_failure dump_summary dump_pending ].each do |meth|
|
66
69
|
module_eval "def #{meth}(*args); end"
|
67
70
|
end
|
@@ -70,24 +73,38 @@ module Buildr #:nodoc:
|
|
70
73
|
@example_group = example_group
|
71
74
|
end
|
72
75
|
|
76
|
+
def example_passed(example)
|
77
|
+
end
|
78
|
+
|
79
|
+
def example_pending(example, counter, failure)
|
80
|
+
end
|
81
|
+
|
82
|
+
def example_failed(example, counter, failure)
|
83
|
+
if example_group.respond_to?(:spec_path)
|
84
|
+
result.failed << example_group.spec_path.gsub(/:\d+$/, '')
|
85
|
+
else
|
86
|
+
path = path_from_bt(failure.exception.backtrace)
|
87
|
+
result.failed << path if path
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
73
91
|
def start(example_count)
|
74
92
|
@result = TestResult.new
|
75
93
|
end
|
76
94
|
|
77
|
-
def
|
95
|
+
def path_from_bt(ary)
|
78
96
|
files = options.files
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
test = bt if files.include?(bt)
|
84
|
-
end
|
85
|
-
test
|
86
|
-
end
|
87
|
-
options.reporter.instance_variable_get(:@failures).each do |failure|
|
88
|
-
result.failed << files.delete(failure_from_bt[failure.exception.backtrace])
|
97
|
+
test = nil
|
98
|
+
ary.find do |bt|
|
99
|
+
bt = bt.split(':').first.strip
|
100
|
+
test = bt if files.include?(bt)
|
89
101
|
end
|
90
|
-
|
102
|
+
test
|
103
|
+
end
|
104
|
+
|
105
|
+
def close
|
106
|
+
files = options.files
|
107
|
+
result.succeeded = files - result.failed
|
91
108
|
|
92
109
|
FileUtils.mkdir_p(File.dirname(where))
|
93
110
|
File.open(where, 'w') { |f| f.puts YAML.dump(result) }
|
@@ -238,8 +255,21 @@ module Buildr #:nodoc:
|
|
238
255
|
nil
|
239
256
|
when Test::Unit::Failure
|
240
257
|
Error.new(fault.message, fault.location)
|
241
|
-
when Test::Unit::Error
|
258
|
+
when Test::Unit::Error
|
259
|
+
if fault.exception.is_a?(NativeException)
|
260
|
+
exception = fault.exception.cause
|
261
|
+
bt = exception.stack_trace.to_a
|
262
|
+
else
|
263
|
+
exception = fault.exception
|
264
|
+
bt = exception.backtrace
|
265
|
+
end
|
266
|
+
Error.new(exception.message, bt)
|
267
|
+
when Expectations::Results::Error
|
242
268
|
fault.exception
|
269
|
+
when Spec::Runner::Reporter::Failure
|
270
|
+
ex = fault.exception
|
271
|
+
fault.example.instance_variable_get(:@_implementation).to_s =~ /@(.+:\d+)/
|
272
|
+
Error.new(ex.message, [$1.to_s] + ex.backtrace)
|
243
273
|
when Expectations::Results
|
244
274
|
file = fault.file
|
245
275
|
line = fault.line
|
data/lib/buildr/java/tests.rb
CHANGED
@@ -301,17 +301,22 @@ module Buildr
|
|
301
301
|
end
|
302
302
|
|
303
303
|
def run(tests, dependencies) #:nodoc:
|
304
|
-
cmd_args = [ 'org.testng.TestNG', '-sourcedir', task.compile.sources.join(';'), '-suitename', task.
|
304
|
+
cmd_args = [ 'org.testng.TestNG', '-sourcedir', task.compile.sources.join(';'), '-suitename', task.project.id ]
|
305
305
|
cmd_args << '-d' << task.report_to.to_s
|
306
|
+
# run all tests in the same suite
|
307
|
+
cmd_args << '-testclass' << tests
|
306
308
|
cmd_options = { :properties=>options[:properties], :java_args=>options[:java_args],
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
309
|
+
:classpath=>dependencies, :name => "TestNG in #{task.send(:project).name}" }
|
310
|
+
|
311
|
+
begin
|
312
|
+
Java::Commands.java cmd_args, cmd_options
|
313
|
+
return tests
|
314
|
+
rescue
|
315
|
+
# testng-failed.xml contains the list of failed tests *only*
|
316
|
+
report = File.read(File.join(task.report_to.to_s, 'testng-failed.xml'))
|
317
|
+
failed = report.scan(/<class name="(.*)">/im).flatten
|
318
|
+
# return the list of passed tests
|
319
|
+
return tests - failed
|
315
320
|
end
|
316
321
|
end
|
317
322
|
|
data/lib/buildr/packaging.rb
CHANGED
@@ -14,8 +14,11 @@
|
|
14
14
|
# the License.
|
15
15
|
|
16
16
|
|
17
|
-
require 'buildr/packaging/zip'
|
18
|
-
require 'buildr/packaging/tar'
|
19
17
|
require 'buildr/packaging/artifact'
|
20
18
|
require 'buildr/packaging/package'
|
19
|
+
require 'buildr/packaging/archive'
|
20
|
+
require 'buildr/packaging/ziptask'
|
21
|
+
require 'buildr/packaging/tar'
|
21
22
|
require 'buildr/packaging/gems'
|
23
|
+
autoload :Zlib, 'zlib'
|
24
|
+
autoload :Zip, 'buildr/packaging/zip'
|