test_auto_discovery_finds_one_conventional_header

Tests › tests/test_preprocessor.py

passed Passed in the packaged run.

What this test is for

Why it exists

`auto` is OPT-IN, and this is the case it exists for: a Kconfig build has written `include/generated/autoconf.h` and the owner wants the index to represent it without restating the path.

Verifies REQ-DDB-PIPE-014

Given

  1. root = tmp_path / "repo"
  2. (root / "include" / "generated").mkdir(parents=True)
  3. (root / "include" / "generated" / "autoconf.h").write_text( "#define CONFIG_FOO 1\n", encoding="utf-8" )
→

When

  1. config = resolve_preprocessor( root, {SECTION_PREPROCESSOR: {"config_header": CONFIG_HEADER_AUTO}} )
→

Then

  1. ✓ config.macros equals ('"CONFIG_FOO=1"',)
  2. ✓ config.config_header equals "include/generated/autoconf.h"
  3. ✓ config.source equals SOURCE_CONFIG_HEADER

tests/test_preprocessor.py:506 · its file's page

What it checks (3)

  1. assert config.macros == ('"CONFIG_FOO=1"',) observes resolve_preprocessor via config
  2. assert config.config_header == "include/generated/autoconf.h" observes resolve_preprocessor via config
  3. assert config.source == SOURCE_CONFIG_HEADER observes resolve_preprocessor via config

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_auto_discovery_finds_one_conventional_header→resolve_preprocessor

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.

test_auto_discovery_finds_one_conventional_header · 3 checksresolve_preprocessorREQ-DDB-CONFIG-004 · measuredresolve_preprocessor_resolve_config_header_named_config_headerwithin_repoREQ-DDB-PIPE-014 · catalog

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-014catalog1 of 5: within_repo
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.