multicuke 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/multicuke/runner.rb +6 -6
- data/lib/multicuke/version.rb +1 -1
- data/spec/runner_spec.rb +40 -0
- metadata +5 -15
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NGNkNTQxMzAzMGRhMmJiZTA4YTU1N2QxMjQ2MTI1NmY0OGMxODZkYQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OTQ1MDVmNDk0YzFmYTg1MTYzZWQ5ZjEzN2I1MTNlZWNiNzNkYmFkZg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjEyNTI2MDg3NzZiYzE5NWIyMzMzNWYwZDY0ODIwMzZlNDdmODlkZDE4YTFj
|
10
|
+
ZDAzYjg2MTY4ZTcxZmI2NGNlZGFmMmU3MzBlYzU5YWM0OGFkMGQ4OTFjMzBm
|
11
|
+
ZmM0ZWNmODhiOTMxMzc4MTkxZWJiM2ZhNDVhMmUyODFmMzExNjY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ODZmZGFmNTNmNDJkZWZjZDVhZjlhNmI5OWUwN2IwNjAyYWNhN2NmODgwNzJh
|
14
|
+
YTliYTdlYTg4NDhkOThmZjdkZDA1NmM2ZjI1ZGJlNTg3NTQ0YWZmYmE5MTdk
|
15
|
+
YWFjMDE0YzE2ZDFiMTQ2MDgzODQ0MDJkNTA5OTM2MGExYzdkNDU=
|
data/lib/multicuke/runner.rb
CHANGED
@@ -121,7 +121,7 @@ module Multicuke
|
|
121
121
|
if dry_run
|
122
122
|
0
|
123
123
|
else
|
124
|
-
features_dirs.forkoff!(:processes => forks_pool_size){ |features_dir|
|
124
|
+
results = features_dirs.forkoff!(:processes => forks_pool_size){ |features_dir|
|
125
125
|
report_file_path = File.join(reports_path, "#{features_dir.name}.html")
|
126
126
|
feature_full_path = File.join(features_root_path, "#{features_dir.name}")
|
127
127
|
main_command = %W[bundle exec cucumber #{feature_full_path}]
|
@@ -130,13 +130,13 @@ module Multicuke
|
|
130
130
|
full_command = main_command + options + extra_options
|
131
131
|
result = system_command.run full_command
|
132
132
|
puts "Features '#{features_dir.name}' finished. #{result ? 'SUCCESS' : 'FAILURE'} (pid: #{Process.pid})"
|
133
|
-
|
133
|
+
result
|
134
134
|
}
|
135
|
-
|
136
|
-
|
137
|
-
pid, status = *process
|
138
|
-
result + status.exitstatus
|
135
|
+
global_exit_status = results.inject(0) { |acc, result|
|
136
|
+
result ? acc : acc +1
|
139
137
|
}
|
138
|
+
puts "Global exit status = #{global_exit_status}"
|
139
|
+
global_exit_status
|
140
140
|
end
|
141
141
|
end
|
142
142
|
|
data/lib/multicuke/version.rb
CHANGED
data/spec/runner_spec.rb
CHANGED
@@ -34,6 +34,46 @@ module Multicuke
|
|
34
34
|
runner.excluded_dirs.should be_empty
|
35
35
|
runner.extra_options.should be_empty
|
36
36
|
end
|
37
|
+
|
38
|
+
it "exits with 0 when all features succeed " do
|
39
|
+
system_command_stub = double("SystemCommand")
|
40
|
+
system_command_stub.stub(:run).and_return(true,true)
|
41
|
+
system_command_stub.should_receive(:exit) {0}
|
42
|
+
features_root = File.expand_path("../features", __FILE__)
|
43
|
+
runner = Multicuke::Runner.new(features_root) do |r|
|
44
|
+
r.included_only_dirs = ["addition","division"]
|
45
|
+
r.dry_run = true
|
46
|
+
r.output_path = RESULTS_DIR_PATH
|
47
|
+
r.system_command = system_command_stub
|
48
|
+
end
|
49
|
+
runner.start
|
50
|
+
end
|
51
|
+
it "exits with 1 when one feature fails " do
|
52
|
+
system_command_stub = double("SystemCommand")
|
53
|
+
system_command_stub.stub(:run).and_return(true,false)
|
54
|
+
system_command_stub.should_receive(:exit) {1}
|
55
|
+
features_root = File.expand_path("../features", __FILE__)
|
56
|
+
runner = Multicuke::Runner.new(features_root) do |r|
|
57
|
+
r.included_only_dirs = ["addition","division"]
|
58
|
+
r.dry_run = true
|
59
|
+
r.output_path = RESULTS_DIR_PATH
|
60
|
+
r.system_command = system_command_stub
|
61
|
+
end
|
62
|
+
runner.start
|
63
|
+
end
|
64
|
+
it "exits with 2 when two feature fail" do
|
65
|
+
system_command_stub = double("SystemCommand")
|
66
|
+
system_command_stub.stub(:run).and_return(true,false,false)
|
67
|
+
system_command_stub.should_receive(:exit) {2}
|
68
|
+
features_root = File.expand_path("../features", __FILE__)
|
69
|
+
runner = Multicuke::Runner.new(features_root) do |r|
|
70
|
+
r.included_only_dirs = ["addition","division","empty"]
|
71
|
+
r.dry_run = true
|
72
|
+
r.output_path = RESULTS_DIR_PATH
|
73
|
+
r.system_command = system_command_stub
|
74
|
+
end
|
75
|
+
runner.start
|
76
|
+
end
|
37
77
|
end
|
38
78
|
|
39
79
|
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multicuke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Simon Caplette
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-05-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: cucumber
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rspec
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: nokogiri
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: forkoff
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -109,27 +100,26 @@ files:
|
|
109
100
|
- spec/system_command_spec.rb
|
110
101
|
homepage: https://github.com/simcap/multicuke
|
111
102
|
licenses: []
|
103
|
+
metadata: {}
|
112
104
|
post_install_message:
|
113
105
|
rdoc_options: []
|
114
106
|
require_paths:
|
115
107
|
- lib
|
116
108
|
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
-
none: false
|
118
109
|
requirements:
|
119
110
|
- - ! '>='
|
120
111
|
- !ruby/object:Gem::Version
|
121
112
|
version: '0'
|
122
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
|
-
none: false
|
124
114
|
requirements:
|
125
115
|
- - ! '>='
|
126
116
|
- !ruby/object:Gem::Version
|
127
117
|
version: '0'
|
128
118
|
requirements: []
|
129
119
|
rubyforge_project:
|
130
|
-
rubygems_version:
|
120
|
+
rubygems_version: 2.0.3
|
131
121
|
signing_key:
|
132
|
-
specification_version:
|
122
|
+
specification_version: 4
|
133
123
|
summary: Run one cucumber process per features directory
|
134
124
|
test_files:
|
135
125
|
- spec/dryrun_spec.rb
|