ci-queue 0.52.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ci/queue/bisect.rb +4 -0
- data/lib/ci/queue/version.rb +1 -1
- data/lib/minitest/queue/build_status_reporter.rb +8 -0
- data/lib/minitest/queue/runner.rb +14 -11
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db80b6deb328b8a734e037a230660690812bb4123073e3ec0c3db5f1bee11e21
|
4
|
+
data.tar.gz: 88ee3979041275c756d5a61107ada32d879e15d2111261b178cbf9503b1e30a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3208f3d9164d15fad57e7b986b5018bc6c9c92371fff00c1acd9e13275ff723dfb825b76753fdcdc4fad7e6e1ac1f7c4ccf4c4e4e26f9a0a05f86a42e34e1f12
|
7
|
+
data.tar.gz: 052fa12268780996dc85d819b7f4e7f551d5e5cc44cf6bb3c9fb88b4d8eece68318e3042e30c28962f39207c38f86139cb1ce1b90319e8bf283ef22c812018fd
|
data/Gemfile.lock
CHANGED
data/lib/ci/queue/bisect.rb
CHANGED
@@ -27,6 +27,10 @@ module CI
|
|
27
27
|
Static.new([config.failing_test], config).populate(@all_tests)
|
28
28
|
end
|
29
29
|
|
30
|
+
def failing_test_present?
|
31
|
+
@all_tests.find { |t| t.id == config.failing_test }
|
32
|
+
end
|
33
|
+
|
30
34
|
def candidates
|
31
35
|
Static.new(first_half + [config.failing_test], config).populate(@all_tests)
|
32
36
|
end
|
data/lib/ci/queue/version.rb
CHANGED
@@ -75,6 +75,14 @@ module Minitest
|
|
75
75
|
build.progress
|
76
76
|
end
|
77
77
|
|
78
|
+
def write_failure_file(file)
|
79
|
+
File.write(file, error_reports.map(&:to_h).to_json)
|
80
|
+
end
|
81
|
+
|
82
|
+
def write_flaky_tests_file(file)
|
83
|
+
File.write(file, flaky_reports.to_json)
|
84
|
+
end
|
85
|
+
|
78
86
|
private
|
79
87
|
|
80
88
|
attr_reader :build
|
@@ -189,6 +189,13 @@ module Minitest
|
|
189
189
|
populate_queue
|
190
190
|
|
191
191
|
step("Testing the failing test in isolation")
|
192
|
+
unless queue.failing_test_present?
|
193
|
+
puts reopen_previous_step
|
194
|
+
puts red("The failing test does not exist.")
|
195
|
+
File.write('log/test_order.log', "")
|
196
|
+
exit! 1
|
197
|
+
end
|
198
|
+
|
192
199
|
unless run_tests_in_fork(queue.failing_test)
|
193
200
|
puts reopen_previous_step
|
194
201
|
puts red("The test fail when ran alone, no need to bisect.")
|
@@ -252,7 +259,11 @@ module Minitest
|
|
252
259
|
unless supervisor.exhausted?
|
253
260
|
reporter = BuildStatusReporter.new(build: supervisor.build)
|
254
261
|
reporter.report
|
262
|
+
reporter.write_failure_file(queue_config.failure_file) if queue_config.failure_file
|
263
|
+
reporter.write_flaky_tests_file(queue_config.export_flaky_tests_file) if queue_config.export_flaky_tests_file
|
264
|
+
|
255
265
|
msg = "#{supervisor.size} tests weren't run."
|
266
|
+
|
256
267
|
if supervisor.max_test_failed?
|
257
268
|
puts('Encountered too many failed tests. Test run was ended early.')
|
258
269
|
abort!(msg)
|
@@ -263,18 +274,10 @@ module Minitest
|
|
263
274
|
end
|
264
275
|
|
265
276
|
reporter = BuildStatusReporter.new(build: supervisor.build)
|
266
|
-
|
267
|
-
if queue_config.
|
268
|
-
failures = reporter.error_reports.map(&:to_h).to_json
|
269
|
-
File.write(queue_config.failure_file, failures)
|
270
|
-
end
|
271
|
-
|
272
|
-
if queue_config.export_flaky_tests_file
|
273
|
-
failures = reporter.flaky_reports.to_json
|
274
|
-
File.write(queue_config.export_flaky_tests_file, failures)
|
275
|
-
end
|
276
|
-
|
277
|
+
reporter.write_failure_file(queue_config.failure_file) if queue_config.failure_file
|
278
|
+
reporter.write_flaky_tests_file(queue_config.export_flaky_tests_file) if queue_config.export_flaky_tests_file
|
277
279
|
reporter.report
|
280
|
+
|
278
281
|
exit! reporter.success? ? 0 : 1
|
279
282
|
end
|
280
283
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci-queue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.54.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -242,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
242
|
- !ruby/object:Gem::Version
|
243
243
|
version: '0'
|
244
244
|
requirements: []
|
245
|
-
rubygems_version: 3.5.
|
245
|
+
rubygems_version: 3.5.10
|
246
246
|
signing_key:
|
247
247
|
specification_version: 4
|
248
248
|
summary: Distribute tests over many workers using a queue
|