CIRCT 23.0.0git
Loading...
Searching...
No Matches
Functions | Variables
tests.integration.test_codegen_cpp Namespace Reference

Functions

Path _build (Path sources_dir)
 
 _make_probe_test (str probe)
 
 _make_codegen_class (str name, bsp_args)
 

Variables

list PROBES
 
 TestCodegen = _make_codegen_class("TestCodegen", ("{tmp_dir}",))
 
 TestCodegenDma
 

Detailed Description

Pytest harness for the codegen + port-kind coverage tests.

Where ``test_serialization_probes`` exercises wire-format invariants, this
suite exercises the *port-kind* surface area of the ESI runtime + facade
codegen end-to-end. It builds the C++ driver under ``sw/test_codegen.cpp``
against generated ESI facade headers and runs each probe individually
against a cosim-driven instance of ``hw/test_codegen.py``.

Two test classes are generated — one for the default ``cosim`` BSP and one
for ``cosim_dma`` — so every probe is exercised through both channel
transport paths.

Function Documentation

◆ _build()

Path tests.integration.test_codegen_cpp._build ( Path  sources_dir)
protected

Definition at line 50 of file test_codegen_cpp.py.

◆ _make_codegen_class()

tests.integration.test_codegen_cpp._make_codegen_class ( str  name,
  bsp_args 
)
protected
Build a test class with one method per probe, decorated with cosim_test.

Definition at line 65 of file test_codegen_cpp.py.

References tests.integration.test_codegen_cpp._make_probe_test().

◆ _make_probe_test()

tests.integration.test_codegen_cpp._make_probe_test ( str  probe)
protected
Create a test method that runs a single probe.

Definition at line 54 of file test_codegen_cpp.py.

Referenced by tests.integration.test_codegen_cpp._make_codegen_class().

Variable Documentation

◆ PROBES

list tests.integration.test_codegen_cpp.PROBES
Initial value:
1= [
2 "typed_func_multi_arg",
3 "typed_func_void_arg",
4 "typed_func_void_result",
5 "call_service_callback",
6 "typed_read_channel_struct",
7 "typed_write_channel_byte",
8 "mmio_read_write",
9 "telemetry_metric",
10 "indexed_func_group",
11 "custom_service_decl_channel_0",
12 "custom_service_decl_channel_1",
13 "typed_func_struct",
14 "typed_func_nested_struct",
15 "typed_func_subbyte_signed",
16 "typed_func_array_result",
17 "typed_func_windowed_list",
18 "channel_windowed_list_read",
19 "channel_windowed_list_write",
20 "callback_windowed_list",
21]

Definition at line 27 of file test_codegen_cpp.py.

◆ TestCodegen

tests.integration.test_codegen_cpp.TestCodegen = _make_codegen_class("TestCodegen", ("{tmp_dir}",))

Definition at line 72 of file test_codegen_cpp.py.

◆ TestCodegenDma

tests.integration.test_codegen_cpp.TestCodegenDma
Initial value:
1= _make_codegen_class("TestCodegenDma",
2 ("{tmp_dir}", "cosim_dma"))

Definition at line 73 of file test_codegen_cpp.py.