forking_test_runner 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/forking_test_runner.rb +5 -6
- data/lib/forking_test_runner/cli.rb +0 -1
- data/lib/forking_test_runner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 310cb4e18cc6ae7699b73ed2ff52b7ace99f4c85ad6d96c57a2e3b26251a9be2
|
4
|
+
data.tar.gz: fc42925b1e5c1bc1039b2ef2900e29de0c9dea7494eb69517d13d1b3c3ee0f91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a37d5ec4d8cde469b487c7bffa9153c030aca524e8a9e91bd1ada13c8cdec6f2be5042588472620d9f39b2234d44470ea26d9b2beb4a3c3f7070d01439c6918a
|
7
|
+
data.tar.gz: 15d354d5a8047be55e86df400a6ebed70594e68b25afec6e2fd14cc9b163fd07dbe09a7b1eccd407d06822a13f70e81b1e061601e93eefb0d5af0647cfd34216
|
data/lib/forking_test_runner.rb
CHANGED
@@ -365,21 +365,20 @@ module ForkingTestRunner
|
|
365
365
|
def summarize_partial_reports
|
366
366
|
reports = Dir.glob("#{CONVERAGE_REPORT_PREFIX}*")
|
367
367
|
return if reports.empty?
|
368
|
+
key = nil
|
368
369
|
|
369
370
|
require "json" # not a global dependency
|
370
371
|
coverage = reports.each_with_object({}) do |report, all|
|
371
|
-
|
372
|
+
data = JSON.parse(File.read(report), symbolize_names: true)
|
373
|
+
key ||= data.keys.first
|
374
|
+
suites = data.values
|
372
375
|
raise "Unsupported number of suites #{suites.size}" if suites.size != 1
|
373
376
|
all.replace CoverageCapture.merge_coverage(all, suites.first.fetch(:coverage))
|
374
377
|
ensure
|
375
378
|
File.unlink(report) # do not leave junk behind
|
376
379
|
end
|
377
380
|
|
378
|
-
|
379
|
-
coverage.transform_values! { |v| v.is_a?(Hash) ? v.fetch(:lines) : v } if @options[:report_line_coverage]
|
380
|
-
|
381
|
-
# chose "Minitest" because it is what simplecov uses for reports and "Unit Tests" makes sonarqube break
|
382
|
-
data = JSON.pretty_generate("Minitest" => {"coverage" => coverage, "timestamp" => Time.now.to_i })
|
381
|
+
data = JSON.pretty_generate(key => {"coverage" => coverage, "timestamp" => Time.now.to_i })
|
383
382
|
File.write(SingleCov.coverage_report, data)
|
384
383
|
|
385
384
|
# make it not override our report when it finishes for main process
|
@@ -8,7 +8,6 @@ module ForkingTestRunner
|
|
8
8
|
[:no_fixtures, "--no-fixtures", "Do not load fixtures"],
|
9
9
|
[:no_ar, "--no-ar", "Disable ActiveRecord logic"],
|
10
10
|
[:merge_coverage, "--merge-coverage", "Merge base code coverage into individual files coverage and summarize coverage report"],
|
11
|
-
[:report_line_coverage, "--report-line-coverage", "Convert coverage report to line coverage (for compatibility)"],
|
12
11
|
[
|
13
12
|
:record_runtime,
|
14
13
|
"--record-runtime=MODE",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forking_test_runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.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: 2020-10-
|
11
|
+
date: 2020-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel_tests
|