CIRCT 23.0.0git
Loading...
Searching...
No Matches
Static Public Attributes | List of all members
pytest.CosimPytestConfig Class Reference
Collaboration diagram for pytest.CosimPytestConfig:
Collaboration graph
[legend]

Static Public Attributes

SourceGeneratorArg source_generator
 
tuple args = ("{tmp_dir}",)
 
str simulator = "verilator"
 
str top = "ESI_Cosim_Top"
 
bool debug = False
 
float timeout_s = _DEFAULT_TIMEOUT_S
 
Optional failure_matcher = _DEFAULT_FAILURE_PATTERN
 
Optional warning_matcher = _DEFAULT_WARN_PATTERN
 
Optional tmp_dir_root = None
 
bool delete_tmp_dir = True
 
Optional class_name = None
 
Optional test_name = None
 
Optional pytest_run_id = None
 
Optional xdist_worker_id = None
 
bool save_waveform = False
 

Detailed Description

Immutable configuration for a single cosim test or test class.

Attributes:
  source_generator: Path to the PyCDE hardware generation script, or a
    callable ``(config, tmp_dir) -> sources_dir``.
  args: Arguments passed to the script; ``{tmp_dir}`` is interpolated.
  simulator: Simulator backend name (e.g. ``"verilator"``).
  top: Top-level module name for the simulator.
  debug: If True, enable verbose simulator output.
  timeout_s: Maximum wall-clock seconds before the test is killed.
  failure_matcher: Pattern applied to simulator output to detect errors.
  warning_matcher: Pattern applied to simulator output to detect warnings.
  tmp_dir_root: Root directory for temporary directories. If None, uses system temp.
  delete_tmp_dir: If True, delete temporary directories after test completion.
  class_name: Name of the test class (for class-based tests). None for function tests.
  test_name: Name of the test function or method.
  pytest_run_id: Unique identifier for the pytest run (e.g., "pytest-12345").
  xdist_worker_id: ID of the xdist worker if running under pytest-xdist (e.g., "gw0").
  save_waveform: If True, dump waveform file. Format depends on backend. Requires debug=True.

Definition at line 141 of file pytest.py.

Member Data Documentation

◆ args

tuple pytest.CosimPytestConfig.args = ("{tmp_dir}",)
static

Definition at line 164 of file pytest.py.

◆ class_name

Optional pytest.CosimPytestConfig.class_name = None
static

Definition at line 173 of file pytest.py.

◆ debug

bool pytest.CosimPytestConfig.debug = False
static

◆ delete_tmp_dir

bool pytest.CosimPytestConfig.delete_tmp_dir = True
static

Definition at line 172 of file pytest.py.

◆ failure_matcher

Optional pytest.CosimPytestConfig.failure_matcher = _DEFAULT_FAILURE_PATTERN
static

Definition at line 169 of file pytest.py.

◆ pytest_run_id

Optional pytest.CosimPytestConfig.pytest_run_id = None
static

Definition at line 175 of file pytest.py.

◆ save_waveform

bool pytest.CosimPytestConfig.save_waveform = False
static

Definition at line 177 of file pytest.py.

Referenced by simulator.Simulator.run_proc().

◆ simulator

str pytest.CosimPytestConfig.simulator = "verilator"
static

Definition at line 165 of file pytest.py.

◆ source_generator

SourceGeneratorArg pytest.CosimPytestConfig.source_generator
static

Definition at line 163 of file pytest.py.

◆ test_name

Optional pytest.CosimPytestConfig.test_name = None
static

Definition at line 174 of file pytest.py.

◆ timeout_s

float pytest.CosimPytestConfig.timeout_s = _DEFAULT_TIMEOUT_S
static

Definition at line 168 of file pytest.py.

◆ tmp_dir_root

Optional pytest.CosimPytestConfig.tmp_dir_root = None
static

Definition at line 171 of file pytest.py.

◆ top

str pytest.CosimPytestConfig.top = "ESI_Cosim_Top"
static

Definition at line 166 of file pytest.py.

◆ warning_matcher

Optional pytest.CosimPytestConfig.warning_matcher = _DEFAULT_WARN_PATTERN
static

Definition at line 170 of file pytest.py.

◆ xdist_worker_id

Optional pytest.CosimPytestConfig.xdist_worker_id = None
static

Definition at line 176 of file pytest.py.


The documentation for this class was generated from the following file: