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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38151e0d34ca4081dea4782b8bd0ee4c522c60e8
4
- data.tar.gz: 14cbff2823879b021ebd16dab027e728a146bc4f
3
+ metadata.gz: f3dd1fe7fa1df56293a639541c8c08f69e60ecfb
4
+ data.tar.gz: 39e0aacbad46167d6f74d3bee9eb22f3755be848
5
5
  SHA512:
6
- metadata.gz: 3d269fa457ead201112c6046ff79eded087d198d2f597e0f9d7fddbc9cb2be15cf5cf12ab6008ada2d37cad7db93dd097039af4cdebcac096ec995c8f2a11561
7
- data.tar.gz: e7f4a3b8a7900042606e7682fefc64d13bcc797ea9b1a9f13514b99a2436376e670e89f69a59ae3be769260bdcb84f6c2418a4d95a0496beaa2eca2acc03e59a
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("--thread INDEX") do |parameter|
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("--job INDEX") do |parameter|
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 ouputs { :job_index => 1, :job_count => 32 }
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
 
@@ -1,3 +1,3 @@
1
1
  module TestBoosters
2
- VERSION = "2.4.0".freeze
2
+ VERSION = "2.5.0".freeze
3
3
  end
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.0
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-14 00:00:00.000000000 Z
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