Skip to content

bug(sim-flow): failed cocotb or failed simulation runtime is not propagate as an error by sim flow #493

@tymonx

Description

@tymonx

Some HDL simulators don't return a non-zero return code (!= 0) when something failed during simulation runtime. Including failed cocotb tests or failed cocotb initialization.

Cocotb Runner class is handling that by inspecting generated JUnit XML file. It will fail if:

  • Generated JUnit XML file results.xml is not present
  • Generated JUnix XML file results.xml contains non-zero failures or errors in <testsuite> XML elements

Something similar could be implemented in Edalize.

References:

This should be implemented in edalize/flows/sim.py.

To reproduce it:

Image

The test_dff test is invoking fusesoc run dff command -> src/pytest_cocotb/fusesoc/plugin.py.

    run(["fusesoc", "run", hdl.toplevel], check=True)

It should fail not pass. The check=True argument will tell the subprocess.run function to raise an exception when invoked command returned a non-zero status code (error).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions