semaphore_test_boosters 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/test_boosters/boosters/base.rb +16 -0
- data/lib/test_boosters/cli_parser.rb +16 -3
- data/lib/test_boosters/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3dd1fe7fa1df56293a639541c8c08f69e60ecfb
|
4
|
+
data.tar.gz: 39e0aacbad46167d6f74d3bee9eb22f3755be848
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d33c98591555d793f88c6aa21f20d4714b9b80a47f17ff03deb8b3dfabef3c91f4d30435550c2f4fad4a901e78bf43f33f00d4a1413405baa0b8083a6d28757
|
7
|
+
data.tar.gz: a55d3224f3364b55a967c5c24417d3fce3287a58d45e43d6e5663d144baa3b63e4a23252435471a6f5c4220f55750f8bb771298c07e56cf1091d0665e51508bf
|
@@ -18,6 +18,12 @@ module TestBoosters
|
|
18
18
|
|
19
19
|
known, leftover = distribution.files_for(job_index)
|
20
20
|
|
21
|
+
if cli_options[:dry_run]
|
22
|
+
show_files_for_dry_run("known", known)
|
23
|
+
show_files_for_dry_run("leftover", leftover)
|
24
|
+
return 0
|
25
|
+
end
|
26
|
+
|
21
27
|
exit_status = TestBoosters::Job.run(@command, known, leftover)
|
22
28
|
|
23
29
|
after_job # execute some activities when the job finishes
|
@@ -25,6 +31,16 @@ module TestBoosters
|
|
25
31
|
exit_status
|
26
32
|
end
|
27
33
|
|
34
|
+
def show_files_for_dry_run(label, files)
|
35
|
+
if files.empty?
|
36
|
+
puts "[DRY RUN] No #{label} files."
|
37
|
+
return
|
38
|
+
end
|
39
|
+
|
40
|
+
puts "\n[DRY RUN] Running tests for #{label} files:"
|
41
|
+
puts files.map { |file| "- #{file}" }.join("\n")
|
42
|
+
end
|
43
|
+
|
28
44
|
def before_job
|
29
45
|
# Do nothing
|
30
46
|
end
|
@@ -9,15 +9,28 @@ module TestBoosters
|
|
9
9
|
options = {}
|
10
10
|
|
11
11
|
parser = OptionParser.new do |opts|
|
12
|
-
opts.on(
|
12
|
+
opts.on(
|
13
|
+
"--thread INDEX",
|
14
|
+
"[DEPRECATED] Use the '--job' option instead"
|
15
|
+
) do |parameter|
|
13
16
|
puts "[DEPRECATION WARNING] The '--thread' parameter is deprecated. Please use '--job' instead."
|
14
17
|
|
15
18
|
options.merge!(parse_job_params(parameter))
|
16
19
|
end
|
17
20
|
|
18
|
-
opts.on(
|
21
|
+
opts.on(
|
22
|
+
"--job INDEX",
|
23
|
+
"The job index and number of total jobs. e.g. --job 4/32"
|
24
|
+
) do |parameter|
|
19
25
|
options.merge!(parse_job_params(parameter))
|
20
26
|
end
|
27
|
+
|
28
|
+
opts.on(
|
29
|
+
"--dry-run",
|
30
|
+
"Only print the files that will be run for this job index"
|
31
|
+
) do |parameter|
|
32
|
+
options.merge!(:dry_run => parameter)
|
33
|
+
end
|
21
34
|
end
|
22
35
|
|
23
36
|
parser.parse!
|
@@ -25,7 +38,7 @@ module TestBoosters
|
|
25
38
|
options
|
26
39
|
end
|
27
40
|
|
28
|
-
# parses input like '1/32' and
|
41
|
+
# parses input like '1/32' and outputs { :job_index => 1, :job_count => 32 }
|
29
42
|
def parse_job_params(input_parameter)
|
30
43
|
job_index, job_count, _rest = input_parameter.split("/")
|
31
44
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semaphore_test_boosters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Developers at Rendered Text
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semaphore_cucumber_booster_config
|