test_the_declared_header_wins_over_an_alternative_profile¶
Tests › tests/test_config_defaults.py
What this test is for
Why it exists
THE EXACT mbedtls SHAPE. `MBEDTLS_PLATFORM_MEMORY` is commented out in the declared `mbedtls_config.h` and actively defined in two profiles under `configs/`. A default build reads the declared header, so it answers; the profiles describe other builds and must not outvote it. Letting them would reproduce the measured wrong answer with extra steps.
Given
conn = _gate_db( tmp_path, "w.db", [ ("FEATURE_X", "off", "", "include/proj_config.h", 208, "", "declared"), ("FEATURE_X", "on", "", "configs/profile_a_config.h", 87, "", "heuristic"), ("FEATURE_X", "on", "", "configs/profile_b_config.h", 20, "", "heuristic"), ], )
When
gates, _ = gates_covering(conn, "src/platform.h", 20)conn.close()
Then
- ✓ gates[0].default_state equals "off"
- ✓ gates[0].default_site equals "include/proj_config.h:208"
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.
Look up one name: everything the index holds about it · 12 of 226 steps
… 17 earlier steps
… 38 steps between
… 151 later steps
2 more
- `main` (scripts/export_parity.py) · 8 of 203 steps
- clew — `main` (clew/cli.py) · 7 of 400 steps
tests/test_config_defaults.py:334 · its file's page
What it checks (2)
assert gates[0].default_state == "off", "the shipped header decides the default build"not attributedassert gates[0].default_site == "include/proj_config.h:208"not attributed
Where the product reaches it
dossier→subject_payload→_flatten_subject→_gate_definitions→macro_definitions→macro_definitions_conn→_macro_def→gates_covering(flow)
Call flow
What 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.
Also reaches 6 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-015 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-004 measured
- REQ-DDB-QUERY-006 measured
- REQ-DDB-QUERY-013 measured
- REQ-DDB-SCHEMA-012 measured