parallel_tests 2.28.0 → 2.29.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
  SHA256:
3
- metadata.gz: a6a3302bc606b106b21ad18230f4c44c0981890cf5e603ecd7a85f4a800766f6
4
- data.tar.gz: c1269f9f6a3faba3d8220a360d2b050d49ccef83c14c83cf6a243a4dca7d245c
3
+ metadata.gz: c1785703914f1da49ce8ea9a1473946b2c0263eb559395763adf58afdbd3a450
4
+ data.tar.gz: 1a92cff387e16ab30d4752f262be75bde00d6ee8d31ee01db55a2fed35067a34
5
5
  SHA512:
6
- metadata.gz: a1e9ea15748222c5acc25f8a2fee413bed29e7dff207ff968b1ffe2cbe54bb221acca26c5c83abe5f0188a8f41226392fdf356be75a2e47573c18cc0c477b406
7
- data.tar.gz: ea67c57a7037e57936ca818e79239bb42a8c18cdecd26cb6ac7496672073c3cca652e9f814227139a816676d721e5cbf8fb68fbb77da49138a5ce8426cbffce0
6
+ metadata.gz: ee26cf48325870c3632ee09516cad542fb1316d774100a96605838004aee83fbd003a73917efd5709dd95032c8d98238f1dc3206251bea41c10393d34abd813c
7
+ data.tar.gz: 0e229da1dc422e771a3b23f2c1df476b436b656b9882808d49ee8f8896464c87cee30c588efb39c16f94c1b6d1e7ddb032fecf897d4e340b4974966fed47a4e4
data/Readme.md CHANGED
@@ -224,8 +224,10 @@ Options are:
224
224
  --runtime-log [PATH] Location of previously recorded test runtimes
225
225
  --allowed-missing Allowed percentage of missing runtimes (default = 50)
226
226
  --unknown-runtime [FLOAT] Use given number as unknown runtime (otherwise use average time)
227
- --verbose Print more output
228
- --quiet Do not print anything, apart from test output
227
+ --verbose Print debug output
228
+ --verbose-process-command Print the command that will be executed by each process before it begins
229
+ --verbose-rerun-command After a process fails, print the command executed by that process
230
+ --quiet Print only test output
229
231
  -v, --version Show Version
230
232
  -h, --help Show this.
231
233
 
@@ -283,11 +285,6 @@ TIPS
283
285
 
284
286
  Contribute your own gotchas to the [Wiki](https://github.com/grosser/parallel_tests/wiki) or even better open a PR :)
285
287
 
286
- TODO
287
- ====
288
- - fix tests vs cucumber >= 1.2 `unknown option --format`
289
- - add unit tests for cucumber runtime formatter
290
-
291
288
  Authors
292
289
  ====
293
290
  inspired by [pivotal labs](https://blog.pivotal.io/labs/labs/parallelize-your-rspec-suite)
@@ -375,6 +372,7 @@ inspired by [pivotal labs](https://blog.pivotal.io/labs/labs/parallelize-your-rs
375
372
  - [Justin Doody](https://github.com/justindoody)
376
373
  - [Sandeep Singh](https://github.com/sandeepnagra)
377
374
  - [Calaway](https://github.com/calaway)
375
+ - [alboyadjian](https://github.com/alboyadjian)
378
376
 
379
377
  [Michael Grosser](http://grosser.it)<br/>
380
378
  michael@grosser.it<br/>
@@ -124,7 +124,7 @@ module ParallelTests
124
124
  failing_sets = test_results.reject { |r| r[:exit_status] == 0 }
125
125
  return if failing_sets.none?
126
126
 
127
- if options[:verbose]
127
+ if options[:verbose] || options[:verbose_rerun_command]
128
128
  puts "\n\nTests have failed for a parallel_test group. Use the following command to run the group again:\n\n"
129
129
  failing_sets.each do |failing_set|
130
130
  command = failing_set[:command]
@@ -219,8 +219,10 @@ module ParallelTests
219
219
  opts.on("--allowed-missing [INT]", Integer, "Allowed percentage of missing runtimes (default = 50)") { |percent| options[:allowed_missing_percent] = percent }
220
220
  opts.on("--unknown-runtime [FLOAT]", Float, "Use given number as unknown runtime (otherwise use average time)") { |time| options[:unknown_runtime] = time }
221
221
  opts.on("--first-is-1", "Use \"1\" as TEST_ENV_NUMBER to not reuse the default test environment") { options[:first_is_1] = true }
222
- opts.on("--verbose", "Print more output (mutually exclusive with quiet)") { options[:verbose] = true }
223
- opts.on("--quiet", "Print tests output only (mutually exclusive with verbose)") { options[:quiet] = true }
222
+ opts.on("--verbose", "Print debug output") { options[:verbose] = true }
223
+ opts.on("--verbose-process-command", "Displays only the command that will be executed by each process") { options[:verbose_process_command] = true }
224
+ opts.on("--verbose-rerun-command", "When there are failures, displays the command executed by each process that failed") { options[:verbose_rerun_command] = true }
225
+ opts.on("--quiet", "Print only tests output") { options[:quiet] = true }
224
226
  opts.on("-v", "--version", "Show Version") { puts ParallelTests::VERSION; exit }
225
227
  opts.on("-h", "--help", "Show this.") { puts opts; exit }
226
228
  end.parse!(argv)
@@ -78,7 +78,7 @@ module ParallelTests
78
78
  cmd = "nice #{cmd}" if options[:nice]
79
79
  cmd = "#{cmd} 2>&1" if options[:combine_stderr]
80
80
 
81
- puts cmd if options[:verbose] && !options[:serialize_stdout]
81
+ puts cmd if report_process_command?(options) && !options[:serialize_stdout]
82
82
 
83
83
  execute_command_and_capture_output(env, cmd, options)
84
84
  end
@@ -94,7 +94,9 @@ module ParallelTests
94
94
  exitstatus = $?.exitstatus
95
95
  seed = output[/seed (\d+)/,1]
96
96
 
97
- output = [cmd, output].join("\n") if options[:verbose] && options[:serialize_stdout]
97
+ if report_process_command?(options) && options[:serialize_stdout]
98
+ output = [cmd, output].join("\n")
99
+ end
98
100
 
99
101
  {:stdout => output, :exit_status => exitstatus, :command => cmd, :seed => seed}
100
102
  end
@@ -235,6 +237,12 @@ module ParallelTests
235
237
  end
236
238
  Dir[File.join(folder, pattern)].uniq
237
239
  end
240
+
241
+ private
242
+
243
+ def report_process_command?(options)
244
+ options[:verbose] || options[:verbose_process_command]
245
+ end
238
246
  end
239
247
  end
240
248
  end
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '2.28.0'
2
+ VERSION = Version = '2.29.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.28.0
4
+ version: 2.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-07 00:00:00.000000000 Z
11
+ date: 2019-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel