padded_cell 0.4.0-aarch64-linux-gnu → 0.5.0-aarch64-linux-gnu
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/CHANGELOG.md +8 -0
- data/README.md +7 -1
- data/lib/padded_cell/4.0/padded_cell_native.so +0 -0
- data/lib/padded_cell/discovery.rb +3 -0
- data/lib/padded_cell/loader.rb +19 -1
- data/lib/padded_cell/version.rb +1 -1
- 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: c78a4801679b4d4c1d695c9b00cc4311b366417967c029d9b65f31265eef1d55
|
|
4
|
+
data.tar.gz: d526174ff896689478b5cb51102a5f5ba6bbb1e809accd52cd3305b47d8698ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 65a892670d877c037c1069753835eb3c64abad75b53abdff35868da1b9f52afb0be59f3325b1cfb8957415104f05f35b3682d0343656cc7649aba4f0e2507b00
|
|
7
|
+
data.tar.gz: 6241e4b6bf0275996061daf66e54de63df0b3e780e6b364681b5c10f0d88ec06f96e956ed342db2e216470dd2e2c8f88146553b1c564db03800fe8d9594672b8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0](https://github.com/seuros/padded_cell/compare/v0.4.0...v0.5.0) (2026-11-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* honor Minitest 6.1's abstract_test_case! ([387ae4f](https://github.com/seuros/padded_cell/commit/387ae4f63d5816caed779fc6dcf667942683c4af))
|
|
9
|
+
* refuse to run after minitest/autorun installed its at_exit ([bd3e81d](https://github.com/seuros/padded_cell/commit/bd3e81d40940fe791f086601e69d1c0f4a7c57e9))
|
|
10
|
+
|
|
3
11
|
## 0.4.0 (2026-11-08)
|
|
4
12
|
|
|
5
13
|
- `PADDED_CELL_ASYLUM`: retries failures from the environment. N retries,
|
data/README.md
CHANGED
|
@@ -42,7 +42,7 @@ down. The other 44 never noticed.
|
|
|
42
42
|
|
|
43
43
|
## Installation
|
|
44
44
|
|
|
45
|
-
Requires CRuby 4.0 or newer and Minitest 6
|
|
45
|
+
Requires CRuby 4.0 or newer and Minitest 6.1+, on Linux, macOS or FreeBSD.
|
|
46
46
|
padded_cell is built on `fork`: Windows, JRuby and TruffleRuby are not
|
|
47
47
|
supported.
|
|
48
48
|
|
|
@@ -104,6 +104,12 @@ errors, 3 when only coverage is below a threshold, 130 when interrupted.
|
|
|
104
104
|
Loaded tests are the source of truth: inherited, `define_method` and other
|
|
105
105
|
dynamic tests run even though static discovery cannot see them.
|
|
106
106
|
|
|
107
|
+
Minitest 6.1's `abstract_test_case!` is honored: a base class that calls it
|
|
108
|
+
runs its tests only in its subclasses, wherever it is defined (support files
|
|
109
|
+
included). padded_cell reads the call from the class body, so it has to be a
|
|
110
|
+
plain `abstract_test_case!` statement there, not one made from a block, a
|
|
111
|
+
method, an included module or for another class.
|
|
112
|
+
|
|
107
113
|
### Isolation
|
|
108
114
|
|
|
109
115
|
`--isolation test` forks a cell per test. Forking a preloaded process is
|
|
Binary file
|
|
@@ -20,5 +20,8 @@ module PaddedCell
|
|
|
20
20
|
def source(source, file: '(source)') = refs(PaddedCellNative.discover(source), file)
|
|
21
21
|
|
|
22
22
|
def refs(rows, file) = rows.map { TestRef.new(file, *it) }
|
|
23
|
+
|
|
24
|
+
# Names of the classes declared `abstract_test_case!` in files.
|
|
25
|
+
def abstract_classes(files) = PaddedCellNative.abstract_classes(files)
|
|
23
26
|
end
|
|
24
27
|
end
|
data/lib/padded_cell/loader.rb
CHANGED
|
@@ -16,6 +16,12 @@ module PaddedCell
|
|
|
16
16
|
module_function
|
|
17
17
|
|
|
18
18
|
def call(files, seed:)
|
|
19
|
+
# An at_exit cannot be taken back: refuse rather than run twice.
|
|
20
|
+
if Minitest.installed_at_exit?
|
|
21
|
+
raise LoadFailure, 'minitest/autorun was required before padded_cell loaded the suite: its at_exit ' \
|
|
22
|
+
'would run every test again, unisolated. Drop it from RUBYOPT, or require ' \
|
|
23
|
+
"'minitest' instead where it runs before padded_cell"
|
|
24
|
+
end
|
|
19
25
|
Minitest.singleton_class.prepend(NoAutorun)
|
|
20
26
|
Minitest.seed = seed
|
|
21
27
|
# What `rake test` and `rails test` put on the load path.
|
|
@@ -34,12 +40,24 @@ module PaddedCell
|
|
|
34
40
|
|
|
35
41
|
# [klass, method_name] for every loaded test, the way Minitest finds them.
|
|
36
42
|
def tests
|
|
37
|
-
Minitest::Runnable.runnables
|
|
43
|
+
runnables = Minitest::Runnable.runnables
|
|
44
|
+
abstract = abstract_classes(runnables)
|
|
45
|
+
runnables.flat_map do |klass|
|
|
46
|
+
next [] if abstract.include?(klass.name)
|
|
47
|
+
|
|
38
48
|
klass.runnable_methods.map { [klass, it] }
|
|
39
49
|
rescue NotImplementedError
|
|
40
50
|
[]
|
|
41
51
|
end
|
|
42
52
|
end
|
|
53
|
+
|
|
54
|
+
# Minitest's abstract_test_case! guards the class-level run, which cells
|
|
55
|
+
# never call: the declaration is read from the files the classes were
|
|
56
|
+
# defined in instead, test helpers and support files included.
|
|
57
|
+
def abstract_classes(runnables)
|
|
58
|
+
files = runnables.filter_map { (name = it.name) && Object.const_source_location(name)&.first }
|
|
59
|
+
Discovery.abstract_classes(files.uniq.select { File.file?(it) }).to_set
|
|
60
|
+
end
|
|
43
61
|
end
|
|
44
62
|
|
|
45
63
|
# Which loaded tests run: Minitest's --include/--exclude, plus file:line.
|
data/lib/padded_cell/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: padded_cell
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: aarch64-linux-gnu
|
|
6
6
|
authors:
|
|
7
7
|
- Abdelkader Boudih
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '6.
|
|
18
|
+
version: '6.1'
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '6.
|
|
25
|
+
version: '6.1'
|
|
26
26
|
description: Runs existing Minitest and Rails test suites with fork-per-test isolation,
|
|
27
27
|
crash and timeout containment, seeded timing-aware scheduling and sharding. Discovery
|
|
28
28
|
and scheduling are a Rust extension, precompiled for Linux, macOS and FreeBSD.
|