mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-27 16:51:12 -07:00
forgetest: a test's implementation hash is its own function and its module's shared code
The implementation half of a domain fingerprint was the whole suite
file, so a two-line witness fix in laser.py re-required every laser
test and a rename in cloud.py every cloud test: sixty attended minutes
for changes that touched two test bodies. Now the hash is the test's
own function (its decorator included) together with the module's text
outside every @test function. A body edit moves that test alone; a
helper edit moves the tests of its module, which is what a helper does;
a file that defines no test in the @test form hashes whole. The gate
computes it the same way, from the same code.
Every recorded fingerprint moves once with this, so the next campaign is
a full one: the price of every later fix costing one test.
Also carries the re-targeted cloud replays that the previous commit
left in the working tree (the CI failure on 296fd68).
This commit is contained in:
+9
-5
@@ -65,9 +65,12 @@ each test's *details*.
|
||||
|
||||
A test's **domain fingerprint** is the hash of the `(component, path,
|
||||
blob-id)` triples its coverage globs select in the image manifest, plus the
|
||||
platform identity, plus the hash of the test's own implementation. A PASS
|
||||
recorded under fingerprint F applies to any build whose recomputed
|
||||
fingerprint is F - the same code computes it on the board and in the gate.
|
||||
platform identity, plus the hash of the test's own implementation: its
|
||||
function (decorator included) together with the code its suite module
|
||||
shares among its tests, everything outside the module's `@test`
|
||||
functions. A PASS recorded under fingerprint F applies to any build whose
|
||||
recomputed fingerprint is F - the same code computes it on the board and
|
||||
in the gate.
|
||||
|
||||
Consequences:
|
||||
|
||||
@@ -85,8 +88,9 @@ Consequences:
|
||||
init scripts, a third-party pin with no manifest entry) is layer content
|
||||
and invalidates everything; so does a pin written into a recipe body
|
||||
instead of its pin file (the safe direction).
|
||||
- A change to a test's implementation invalidates that test's earlier
|
||||
passes and no other.
|
||||
- A change inside a test's body invalidates that test's earlier passes
|
||||
and no other; a change to a helper its module shares invalidates the
|
||||
tests of that module.
|
||||
- "Touched" is computed from content hashes carried in the image, never
|
||||
declared by hand.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user