mini_autobot 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4bd4098ffea986a1a695c9337c77bc99630827d
|
4
|
+
data.tar.gz: 1781ddd943251c0efd9adaba3761bc4095aaab69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ff14ee716aac27fe411ca36f2439972e3d65a651a5acc1751ed22d7465c739a40ab0d650167a7d9795175786f4245bc8c5570e42fed3a08760cafc562c97f6c
|
7
|
+
data.tar.gz: fd47fbf800832e8216b4b4d112de774412fac5f662477bb83b551c886684dc7d5ec3ce1285107b06563ca53104b0e63be860426997a7ad3819c7cb8b11f68be8
|
@@ -7,13 +7,14 @@ module MiniAutobot
|
|
7
7
|
@start_time = Time.now
|
8
8
|
clean_result!
|
9
9
|
|
10
|
-
@simultaneous_jobs = simultaneous_jobs
|
11
|
-
@all_tests = all_tests
|
12
|
-
|
13
10
|
connector = MiniAutobot.settings.connector
|
14
11
|
@on_sauce = true if connector.include? 'saucelabs'
|
15
12
|
@platform = connector.split(':')[2] || ''
|
16
13
|
|
14
|
+
@simultaneous_jobs = simultaneous_jobs
|
15
|
+
@simultaneous_jobs = 10 if run_on_mac? # saucelabs account limit for parallel is 10 for mac
|
16
|
+
@all_tests = all_tests
|
17
|
+
|
17
18
|
@pids = []
|
18
19
|
@static_run_command = "mini_autobot -c #{MiniAutobot.settings.connector} -e #{MiniAutobot.settings.env}"
|
19
20
|
tap_reporter_path = MiniAutobot.gem_root.join('lib/tapout/custom_reporters/fancy_tap_reporter.rb')
|
@@ -41,15 +42,6 @@ module MiniAutobot
|
|
41
42
|
# @param [Integer, Array]
|
42
43
|
# n = number of tests will be running in parallel
|
43
44
|
def run_in_parallel!
|
44
|
-
# set number of tests to be running in parallel
|
45
|
-
if simultaneous_jobs.nil?
|
46
|
-
if run_on_mac?
|
47
|
-
@simultaneous_jobs = 10 # saucelabs account limit for parallel is 10 for mac
|
48
|
-
else
|
49
|
-
@simultaneous_jobs = 20 # saucelabs account limit for parallel is 15 for non-mac
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
45
|
size = all_tests.size
|
54
46
|
if size <= simultaneous_jobs
|
55
47
|
run_test_set(all_tests)
|
@@ -42,8 +42,14 @@ module MiniAutobot
|
|
42
42
|
self
|
43
43
|
end
|
44
44
|
|
45
|
-
|
46
|
-
|
45
|
+
# can be used as a flag no matter parallel option is used in command line or not
|
46
|
+
# can also be used to fetch the value if a valid value is specified
|
47
|
+
def parallel
|
48
|
+
if hsh[:parallel] == 0
|
49
|
+
return nil
|
50
|
+
else
|
51
|
+
hsh.fetch(:parallel).to_i
|
52
|
+
end
|
47
53
|
end
|
48
54
|
|
49
55
|
def raw_arguments
|
@@ -78,14 +78,13 @@ module MiniAutobot
|
|
78
78
|
methods = super
|
79
79
|
selected = MiniAutobot.settings.tags
|
80
80
|
|
81
|
-
if MiniAutobot.settings.parallel
|
81
|
+
if MiniAutobot.settings.parallel
|
82
82
|
# check this because I don't know why this runnable_methods gets called three times consecutively when one starts running tests
|
83
83
|
if @@already_executed
|
84
84
|
exit
|
85
85
|
end
|
86
86
|
|
87
|
-
|
88
|
-
parallel = Parallel.new(nil, @@regression_suite)
|
87
|
+
parallel = Parallel.new(MiniAutobot.settings.parallel, @@regression_suite)
|
89
88
|
parallel.run_in_parallel!
|
90
89
|
|
91
90
|
@@already_executed = true
|
data/lib/mini_autobot/version.rb
CHANGED
@@ -68,8 +68,8 @@ module Minitest
|
|
68
68
|
options[:verbosity_level] += 1
|
69
69
|
end
|
70
70
|
|
71
|
-
options[:parallel] =
|
72
|
-
parser.on('-P', '--parallel', 'Run in parallel') do |value|
|
71
|
+
options[:parallel] = 0
|
72
|
+
parser.on('-P', '--parallel PARALLEL', 'Run any number of tests in parallel') do |value|
|
73
73
|
options[:parallel] = value
|
74
74
|
end
|
75
75
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_autobot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ripta Pasay
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-08-
|
13
|
+
date: 2015-08-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|