Tymoteusz Blazejczyk
Tymoteusz Blazejczyk
I have workaround that limitation by overriding the Cocotb internal function `_get_simulator_precision`. Tested with Cocotb `1.9.0` and Cadence Xcelium `24.03.005`. It works perfectly fine with VHDL as top level design....
@imphil I have found clean workaround: 1. Create a dummy Verilog/SystemVerilog module: ```verilog module cocotb; endmodule ``` 2. Compile it normally to any library. Could be also default `work` library....
This could be an additional standalone pytest plugin. Living in `cocotb_tools` package or in separate GitHub/GitLab repository. I think in most cases, it should be enough to only provide additional...
Maybe as alternative to it, `stage` could just accept callable object like function or class 🤔 ```python def random_stage() -> int: return random.randint(0, 100) @cocotb.test(stage=random_stage) async def i_can_run_earlier_or_later_wooz(dut) -> None:...
For own curiosity, I just tested [pytest-random-order](https://pypi.org/project/pytest-random-order/) plugin with https://github.com/cocotb/cocotb/pull/5090 that will allow to use [pytest](https://docs.pytest.org/en/stable/) as regression manager for cocotb tests: ```plaintext pytest tests/pytest_plugin --random-order -rA ``` Cocotb tests...
Also GHDL runner has the same issue when `build_dir` != `test_dir`: https://github.com/cocotb/cocotb/pull/5090#issuecomment-3506670205 From current code of GHDL runner: https://github.com/cocotb/cocotb/blob/5f354f7a7e0e9a0a20a0c67365cd449a0076ebc0/src/cocotb_tools/runner.py#L1197-L1206 The [-P\](https://ghdl-rad.readthedocs.io/en/latest/using/InvokingGHDL.html#cmdoption-ghdl-p-directory) option is missing in this case. Alongside with the...
Heh. Adding `conftest.py` file under sub-directory `./tests/pytest/plugin/` with defined `pytest_plugins = ("cocotb_tools.pytest.plugin",)` failed all non-related tests in CI. ```plaintext _____________________ ERROR collecting tests/pytest/plugin _____________________ Defining 'pytest_plugins' in a non-top-level conftest...
I needed to put tests for pytest cocotb plugin in separate directory `tests/pytest_plugin` instead of sub-directory `tests/pytest/plugin`. Unfortunately, it is not possible to dynamically load plugin between tests. It must...
> Looks like this is almost ready to review? Make sure to mark it as "Ready to Review" when that becomes the case. @ktbarrett I will do that at the...
> Does this work with pytest-xdist? @marlonjames Yes! It will work with [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) plugin. Test functions (cocotb runners) that are running cocotb tests will be scheduled by `xdist` in parallel...