bozo-scripts 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/VERSION +1 -1
- data/lib/bozo/test_runners/nunit.rb +35 -5
- metadata +7 -25
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NzQ5OWIxOTExNDk1MDU1MTNhYWU3MGNhZmQ0NmRhM2RkNmU1ZTkwYg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MzljY2RkYTRmYjQ1NzlhMWY1MmNkZjMxNzBlZGM4ZDYyNjM3YWY1ZA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MzYzOTgyZWVmN2M2MzllZDNlZGVmYzA2ZWIyOGEwYThlNjNkMTdjMDc0Mzhi
|
10
|
+
ZDIwYTNkZmMyZGU0MmNmYjI0YzM1NGEzMWRlMTgyNTczMjg3MDBmYmI0ZWZh
|
11
|
+
NjY2NjBhNmU4YzJmYTNjNWI2MDJlNDgxYWM4MmMzMmVkYzVhMmY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OGFiN2ExOGNkOWRjYmQ2YjNmMjM0MzAwMWRmODk1YTA3ZjBlODllOGRjZTQ0
|
14
|
+
MWY2MjJmZmY2Yzc4NzVkNzA0MDg2NTQ0MDcwN2Q5OGE4ZjVhNjJhMGI4ZTg0
|
15
|
+
OTkzYzY1OGRlZDMxMjhhYjQyOThhZjE5ZTFhYjYxZjcyM2I0NGQ=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.12.0
|
@@ -11,11 +11,12 @@ module Bozo::TestRunners
|
|
11
11
|
# runner_path # should return the path to the runners executable
|
12
12
|
# runner_args # should return the arguments to be passed to use
|
13
13
|
class Nunit
|
14
|
-
|
14
|
+
|
15
15
|
def initialize
|
16
16
|
@projects = []
|
17
17
|
@include = []
|
18
18
|
@exclude = []
|
19
|
+
@execute_in_parallel = false
|
19
20
|
end
|
20
21
|
|
21
22
|
def destination(destination)
|
@@ -47,6 +48,10 @@ module Bozo::TestRunners
|
|
47
48
|
cannot_define_both_include_and_exclude_categories if @include.any?
|
48
49
|
@exclude << exclude
|
49
50
|
end
|
51
|
+
|
52
|
+
def execute_in_parallel
|
53
|
+
@execute_in_parallel = true
|
54
|
+
end
|
50
55
|
|
51
56
|
def to_s
|
52
57
|
"Run tests with nunit against projects #{@projects}"
|
@@ -77,10 +82,13 @@ module Bozo::TestRunners
|
|
77
82
|
# Returns the arguments required for the runner's executable.
|
78
83
|
#
|
79
84
|
# @returns [Array]
|
80
|
-
def runner_args
|
85
|
+
def runner_args(projects = nil, report_prefix = nil)
|
86
|
+
projects = @projects if projects.nil?
|
87
|
+
report_prefix = Time.now.to_i if report_prefix.nil?
|
88
|
+
|
81
89
|
args = []
|
82
90
|
|
83
|
-
|
91
|
+
projects.each do |project|
|
84
92
|
expand_and_glob('temp', 'msbuild', project, '**', "#{project}.dll").each do |test_dll|
|
85
93
|
args << "\"#{test_dll}\""
|
86
94
|
end
|
@@ -88,7 +96,7 @@ module Bozo::TestRunners
|
|
88
96
|
args << '/nologo'
|
89
97
|
|
90
98
|
report_path = @report_path
|
91
|
-
report_path = expand_path('temp', 'nunit', "#{
|
99
|
+
report_path = expand_path('temp', 'nunit', "#{report_prefix}-nunit-report.xml") unless report_path
|
92
100
|
|
93
101
|
# Ensure the directory is there because NUnit won't make it
|
94
102
|
FileUtils.mkdir_p File.dirname(report_path)
|
@@ -101,7 +109,29 @@ module Bozo::TestRunners
|
|
101
109
|
end
|
102
110
|
|
103
111
|
def execute
|
104
|
-
|
112
|
+
if @execute_in_parallel
|
113
|
+
failed_projects = []
|
114
|
+
threads = []
|
115
|
+
|
116
|
+
@projects.each do |project|
|
117
|
+
t = Thread.new {
|
118
|
+
begin
|
119
|
+
execute_command :nunit, [runner_path] << runner_args([project], "#{project}-#{Time.now.to_i}")
|
120
|
+
rescue
|
121
|
+
failed_projects << project
|
122
|
+
end
|
123
|
+
}
|
124
|
+
threads.push(t)
|
125
|
+
end
|
126
|
+
|
127
|
+
threads.each(&:join)
|
128
|
+
|
129
|
+
if failed_projects.length > 0
|
130
|
+
raise Bozo::ExecutionError.new(:nunit, [runner_path] << failed_projects, 1)
|
131
|
+
end
|
132
|
+
else
|
133
|
+
execute_command :nunit, [runner_path] << runner_args
|
134
|
+
end
|
105
135
|
end
|
106
136
|
|
107
137
|
private
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bozo-scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.12.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Garry Shutler
|
@@ -10,12 +9,11 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2016-
|
12
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: nokogiri
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
18
|
- - ~>
|
21
19
|
- !ruby/object:Gem::Version
|
@@ -23,7 +21,6 @@ dependencies:
|
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
25
|
- - ~>
|
29
26
|
- !ruby/object:Gem::Version
|
@@ -31,7 +28,6 @@ dependencies:
|
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: erubis
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
32
|
- - ~>
|
37
33
|
- !ruby/object:Gem::Version
|
@@ -39,7 +35,6 @@ dependencies:
|
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
39
|
- - ~>
|
45
40
|
- !ruby/object:Gem::Version
|
@@ -47,7 +42,6 @@ dependencies:
|
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: test-unit
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
46
|
- - ~>
|
53
47
|
- !ruby/object:Gem::Version
|
@@ -55,7 +49,6 @@ dependencies:
|
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
53
|
- - ~>
|
61
54
|
- !ruby/object:Gem::Version
|
@@ -63,7 +56,6 @@ dependencies:
|
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: bozo
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
60
|
- - ~>
|
69
61
|
- !ruby/object:Gem::Version
|
@@ -71,7 +63,6 @@ dependencies:
|
|
71
63
|
type: :runtime
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
67
|
- - ~>
|
77
68
|
- !ruby/object:Gem::Version
|
@@ -79,7 +70,6 @@ dependencies:
|
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: zip
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
74
|
- - ~>
|
85
75
|
- !ruby/object:Gem::Version
|
@@ -87,7 +77,6 @@ dependencies:
|
|
87
77
|
type: :runtime
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
81
|
- - ~>
|
93
82
|
- !ruby/object:Gem::Version
|
@@ -100,6 +89,8 @@ executables: []
|
|
100
89
|
extensions: []
|
101
90
|
extra_rdoc_files: []
|
102
91
|
files:
|
92
|
+
- LICENSE
|
93
|
+
- VERSION
|
103
94
|
- lib/bozo/compilers/msbuild.rb
|
104
95
|
- lib/bozo/configuration.rb
|
105
96
|
- lib/bozo/dependency_resolvers/bundler.rb
|
@@ -133,36 +124,27 @@ files:
|
|
133
124
|
- lib/bozo/tools/opencover.rb
|
134
125
|
- lib/bozo/version.rb
|
135
126
|
- lib/bozo_scripts.rb
|
136
|
-
- VERSION
|
137
|
-
- LICENSE
|
138
127
|
homepage: https://github.com/zopaUK/bozo-scripts
|
139
128
|
licenses: []
|
129
|
+
metadata: {}
|
140
130
|
post_install_message:
|
141
131
|
rdoc_options: []
|
142
132
|
require_paths:
|
143
133
|
- lib
|
144
134
|
required_ruby_version: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
135
|
requirements:
|
147
136
|
- - ! '>='
|
148
137
|
- !ruby/object:Gem::Version
|
149
138
|
version: '0'
|
150
|
-
segments:
|
151
|
-
- 0
|
152
|
-
hash: 405159741
|
153
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
-
none: false
|
155
140
|
requirements:
|
156
141
|
- - ! '>='
|
157
142
|
- !ruby/object:Gem::Version
|
158
143
|
version: '0'
|
159
|
-
segments:
|
160
|
-
- 0
|
161
|
-
hash: 405159741
|
162
144
|
requirements: []
|
163
145
|
rubyforge_project: bozo-scripts
|
164
|
-
rubygems_version:
|
146
|
+
rubygems_version: 2.6.2
|
165
147
|
signing_key:
|
166
|
-
specification_version:
|
148
|
+
specification_version: 4
|
167
149
|
summary: Zopa build system scripts
|
168
150
|
test_files: []
|