test_gate_counts_reach_the_symbol_rows¶
Tests › tests/test_kconfig.py
What this test is for
Why it exists
A symbol that gates nothing must arrive as 0 rather than as an absence a caller has to interpret.
Given
db = tmp_path / "clew.db"_db_with_paths(db, ("src/motor.c",))
When
model = import_kconfig(db, repo, None)import_kconfig_gates(db, repo)write_build_signature(db, kconfig=model.as_meta())by_name = {s.name: s for s in kconfig_space(db).symbols}
Then
- ✓ by_name["WIDGET_MOTOR_BETA"].gate_count equals 1
- ✓ by_name["WIDGET_MOTOR_NAME"].gate_count equals 0
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
clew — `main` (clew/cli.py) · 24 of 400 steps
… 70 earlier steps
… 128 steps between
… 158 steps between
… 1 later step
2 more
- `main` (scripts/export_parity.py) · 18 of 203 steps
- Look up one name: everything the index holds about it · 4 of 226 steps
tests/test_kconfig.py:404 · its file's page
What it checks (2)
assert by_name["WIDGET_MOTOR_BETA"].gate_count == 1observeskconfig_spaceviaby_nameassert by_name["WIDGET_MOTOR_NAME"].gate_count == 0observeskconfig_spaceviaby_name
Where the product reaches it
main→query_main→_payload→export_search→corpus_payload→kconfig_space(flow)
Call flow
test_gate_counts_reach_the_symbol_rows→_db_with_paths→import_kconfig→import_kconfig_gates→write_build_signature→kconfig_spaceWhat it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
and 4 more requirement paths, listed below.
Also reaches 17 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-004 measured
- REQ-DDB-CONFIG-005 measured
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-PIPE-003 measured
- REQ-DDB-PIPE-005 measured
- REQ-DDB-PIPE-007 measured
- REQ-DDB-PIPE-011 measured
- REQ-DDB-PIPE-012 inferred
- REQ-DDB-PIPE-014 measured
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-004 inferred
- REQ-DDB-QUERY-006 measured
- REQ-DDB-QUERY-013 inferred
- REQ-DDB-SCHEMA-012 measured
- REQ-DDB-SCHEMA-013 measured