parallel_tests 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +5 -1
- data/VERSION +1 -1
- data/bin/parallel_test +8 -3
- data/parallel_tests.gemspec +7 -7
- data/spec/integration_spec.rb +3 -3
- metadata +7 -7
data/README.markdown
CHANGED
@@ -62,9 +62,13 @@ Setup for non-rails
|
|
62
62
|
Options are:
|
63
63
|
-n [PROCESSES] How many processes to use, default: available CPUs
|
64
64
|
-p, --path [PATH] run tests inside this path only
|
65
|
+
-f path/to/test_file,path/to/other_test_file
|
66
|
+
--files run these test files (comma-separated list w/o spaces)
|
65
67
|
-r, --root [PATH] execute test commands from this path
|
68
|
+
-f, --files [FILES] run these test files (comma-separated list w/o spaces)
|
69
|
+
-m, --multiply-processes [FLOAT] use given number as a multiplier of processes to run
|
66
70
|
-e, --exec [COMMAND] execute this code parallel and with ENV['TEST_ENV_NUM']
|
67
|
-
-o, --test-options [SOMETHING]
|
71
|
+
-o, --test-options '[SOMETHING]' execute test commands with those options
|
68
72
|
-t, --type [TYPE] which type of tests to run? test, spec or features
|
69
73
|
-v, --version Show Version
|
70
74
|
-h, --help Show this.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.6
|
data/bin/parallel_test
CHANGED
@@ -13,17 +13,22 @@ Options are:
|
|
13
13
|
BANNER
|
14
14
|
opts.on("-n [PROCESSES]", Integer, "How many processes to use, default: available CPUs"){|n| options[:count] = n }
|
15
15
|
opts.on("-p", '--path [PATH]', "run tests inside this path only"){|path| options[:path_prefix] = path }
|
16
|
-
opts.on("-
|
16
|
+
opts.on("-m [FLOAT]", "--multiply-processes [FLOAT]", Float, "use given number as a multiplier of processes to run"){ |multiply| options[:multiply] = multiply }
|
17
17
|
opts.on("-r", '--root [PATH]', "execute test commands from this path"){|path| options[:root] = path }
|
18
18
|
opts.on("-e", '--exec [COMMAND]', "execute this code parallel and with ENV['TEST_ENV_NUM']"){|path| options[:execute] = path }
|
19
|
-
opts.on("-o",
|
19
|
+
opts.on("-o", "--test-options '[SOMETHING]'", "execute test commands with those options"){|arg| options[:test_options] = arg }
|
20
20
|
opts.on("-t", "--type [TYPE]", "which type of tests to run? test, spec or features"){|type| options[:type] = type }
|
21
21
|
opts.on('-v', '--version', 'Show Version'){ puts ParallelTests::VERSION; exit}
|
22
22
|
opts.on("-h", "--help", "Show this.") { puts opts; exit }
|
23
23
|
end.parse!
|
24
24
|
|
25
|
+
|
26
|
+
# get files to run from arguments
|
27
|
+
options[:files] = ARGV if ARGV.size > 0
|
28
|
+
|
25
29
|
require 'parallel'
|
26
30
|
num_processes = options[:count] || Parallel.processor_count
|
31
|
+
num_processes = num_processes * (options[:multiply] || 1)
|
27
32
|
|
28
33
|
if options[:execute]
|
29
34
|
require File.join(lib_folder, "parallel_tests")
|
@@ -72,4 +77,4 @@ else
|
|
72
77
|
# - rake parallel:test && echo 123 ==> 123 should not show up when test failed
|
73
78
|
# - rake parallel:test db:reset ==> works when tests succeed
|
74
79
|
abort "#{name.capitalize}s Failed" if klass.failed?(results)
|
75
|
-
end
|
80
|
+
end
|
data/parallel_tests.gemspec
CHANGED
@@ -5,13 +5,13 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{parallel_tests}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Grosser"]
|
12
|
-
s.date = %q{2010-05-
|
12
|
+
s.date = %q{2010-05-03}
|
13
13
|
s.email = %q{grosser.michael@gmail.com}
|
14
|
-
s.executables = ["
|
14
|
+
s.executables = ["parallel_spec", "parallel_cucumber", "parallel_test"]
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.markdown"
|
17
17
|
]
|
@@ -41,11 +41,11 @@ Gem::Specification.new do |s|
|
|
41
41
|
s.rubygems_version = %q{1.3.6}
|
42
42
|
s.summary = %q{Run tests / specs / features in parallel}
|
43
43
|
s.test_files = [
|
44
|
-
"spec/
|
45
|
-
"spec/
|
44
|
+
"spec/parallel_cucumber_spec.rb",
|
45
|
+
"spec/integration_spec.rb",
|
46
46
|
"spec/parallel_specs_spec.rb",
|
47
|
-
"spec/
|
48
|
-
"spec/
|
47
|
+
"spec/parallel_tests_spec.rb",
|
48
|
+
"spec/spec_helper.rb"
|
49
49
|
]
|
50
50
|
|
51
51
|
if s.respond_to? :specification_version then
|
data/spec/integration_spec.rb
CHANGED
@@ -4,7 +4,7 @@ describe 'CLI' do
|
|
4
4
|
end
|
5
5
|
|
6
6
|
after do
|
7
|
-
|
7
|
+
`rm -rf #{folder}`
|
8
8
|
end
|
9
9
|
|
10
10
|
def folder
|
@@ -86,9 +86,9 @@ describe 'CLI' do
|
|
86
86
|
write "x1_spec.rb", "puts '111'"
|
87
87
|
write "x2_spec.rb", "puts '222'"
|
88
88
|
write "x3_spec.rb", "puts '333'"
|
89
|
-
result = run_specs(:add => '
|
89
|
+
result = run_specs(:add => 'spec/x1_spec.rb spec/x3_spec.rb')
|
90
90
|
result.should include('111')
|
91
91
|
result.should include('333')
|
92
92
|
result.should_not include('222')
|
93
93
|
end
|
94
|
-
end
|
94
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 6
|
9
|
+
version: 0.3.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Michael Grosser
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-03 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -32,9 +32,9 @@ dependencies:
|
|
32
32
|
description:
|
33
33
|
email: grosser.michael@gmail.com
|
34
34
|
executables:
|
35
|
-
- parallel_test
|
36
35
|
- parallel_spec
|
37
36
|
- parallel_cucumber
|
37
|
+
- parallel_test
|
38
38
|
extensions: []
|
39
39
|
|
40
40
|
extra_rdoc_files:
|
@@ -89,8 +89,8 @@ signing_key:
|
|
89
89
|
specification_version: 3
|
90
90
|
summary: Run tests / specs / features in parallel
|
91
91
|
test_files:
|
92
|
-
- spec/spec_helper.rb
|
93
|
-
- spec/parallel_tests_spec.rb
|
94
|
-
- spec/parallel_specs_spec.rb
|
95
92
|
- spec/parallel_cucumber_spec.rb
|
96
93
|
- spec/integration_spec.rb
|
94
|
+
- spec/parallel_specs_spec.rb
|
95
|
+
- spec/parallel_tests_spec.rb
|
96
|
+
- spec/spec_helper.rb
|