3.1.29.2.11. waf_tools.mock.CMock

class waf_tools.mock.CMock(*k, **kw)

Bases: Task

Task that generates CMock mock source files from header files.

Invokes cmock.rb to produce Mock<Header>.h and Mock<Header>.c from preprocessed and cleaned header files.

run() → None

Execute cmock.rb to generate mock files.

Builds the command from env.RUBY, env.CMOCK, and the global plus optional per-target configuration files. Executes in the output directory of the first output node.

scan() → tuple[list[Node], list[Node]]

Register the global CMock configuration file as a dependency.

Returns:

A tuple of (dependency nodes, empty list). The global bld.cmock_cfg node is included so that changes to the CMock configuration trigger a rebuild.