3.1.29.2.3. waf_tools.mock.create_mocks

waf_tools.mock.create_mocks(self: task_gen, header_nodes: list[Node], test_file: Node) → list[Node]

Declare mock output nodes for each header to be mocked.

Creates Mock<Header>.h and Mock<Header>.c output nodes under mocks/<test_name>/ in the build directory.

Parameters:
  • self – The task generator instance.

  • header_nodes – Header file nodes to generate mocks for.

  • test_file – The test source file (used to derive the output subdirectory name).

Returns:

A list of declared output nodes (headers and sources interleaved).