parallel_split_test 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/Readme.md +23 -1
- data/lib/parallel_split_test/command_line.rb +1 -2
- data/lib/parallel_split_test/version.rb +1 -1
- data/spec/parallel_split_test_spec.rb +2 -2
- metadata +7 -7
data/Gemfile.lock
CHANGED
data/Readme.md
CHANGED
@@ -24,7 +24,29 @@ Usage
|
|
24
24
|
it {sleep 5}
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
parallel_split_test spec/xxx_spec.rb [regular rspec options]
|
28
|
+
|
29
|
+
Output
|
30
|
+
======
|
31
|
+
|
32
|
+
time ./bin/parallel_split_test spec/xx_spec.rb
|
33
|
+
.
|
34
|
+
|
35
|
+
Finished in 5 seconds
|
36
|
+
1 example, 0 failures
|
37
|
+
..
|
38
|
+
|
39
|
+
Finished in 1 seconds
|
40
|
+
2 examples, 0 failures
|
41
|
+
|
42
|
+
real 0m11.015s
|
43
|
+
user 0m0.908s
|
44
|
+
sys 0m0.080s
|
45
|
+
|
46
|
+
|
47
|
+
TIPS
|
48
|
+
====
|
49
|
+
- set number of processes to use with `PARALLEL_SPLIT_TEST_PROCESSES` environment variable
|
28
50
|
|
29
51
|
TODO
|
30
52
|
====
|
@@ -5,8 +5,7 @@ module ParallelSplitTest
|
|
5
5
|
class CommandLine < RSpec::Core::CommandLine
|
6
6
|
def run(err, out)
|
7
7
|
setup_copied_from_rspec(err, out)
|
8
|
-
|
9
|
-
processes = Parallel.processor_count
|
8
|
+
processes = (ENV['PARALLEL_SPLIT_TEST_PROCESSES'] || Parallel.processor_count).to_i
|
10
9
|
|
11
10
|
Parallel.in_processes(processes) do |process_number|
|
12
11
|
ENV['TEST_ENV_NUMBER'] = (process_number == 0 ? '' : (process_number + 1).to_s)
|
@@ -20,7 +20,7 @@ describe ParallelSplitTest do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def parallel_split_test(x)
|
23
|
-
run "../../bin/parallel_split_test #{x}"
|
23
|
+
run "PARALLEL_SPLIT_TEST_PROCESSES=2 ../../bin/parallel_split_test #{x}"
|
24
24
|
end
|
25
25
|
|
26
26
|
def time
|
@@ -87,7 +87,7 @@ describe ParallelSplitTest do
|
|
87
87
|
result.match(rex)[1]
|
88
88
|
end
|
89
89
|
|
90
|
-
processes.should == ['0','2']
|
90
|
+
processes.sort.should == ['0','2']
|
91
91
|
end
|
92
92
|
|
93
93
|
it "runs faster" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_split_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-02-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &82916840 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *82916840
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: parallel
|
27
|
-
requirement: &
|
27
|
+
requirement: &82916590 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 0.5.12
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *82916590
|
36
36
|
description:
|
37
37
|
email: michael@grosser.it
|
38
38
|
executables:
|
@@ -68,7 +68,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
68
68
|
version: '0'
|
69
69
|
segments:
|
70
70
|
- 0
|
71
|
-
hash: -
|
71
|
+
hash: -1019850003
|
72
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
version: '0'
|
78
78
|
segments:
|
79
79
|
- 0
|
80
|
-
hash: -
|
80
|
+
hash: -1019850003
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
83
|
rubygems_version: 1.8.10
|