Skip to content

Commit

Permalink
Update 2024-07-22-simulator_exit_status.markdown
Browse files Browse the repository at this point in the history
Updated link to Questa helper module
  • Loading branch information
williaml33moore authored Aug 9, 2024
1 parent a7e6291 commit d59b867
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/_posts/2024-07-22-simulator_exit_status.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ vsim: Errors: 0, Warnings: 0
If there are errors, they are counted in the log as "Errors."
So for Questa, I wrote a simple Perl script called [qrun_result.pl](https://github.com/williaml33moore/bathtub/blob/main/test/scripts/qrun_result.pl) that post-processes `stats_log` and indicates success (exit status 0!) if and only if the file exists and positively records zero errors in each step.
Otherwise, the Perl script dies with a nonzero exit code.
My `pytest` Python configuration [helper module](https://github.com/williaml33moore/bathtub/blob/main/test/conftest.py) runs the Perl script after every Questa simulation, and catches all my errors and fatalities.
My `pytest` Python configuration [helper module](https://github.com/williaml33moore/bathtub/blob/main/test/resources/helpers/simulator/src/simulator/questa.py) runs the Perl script after every Questa simulation, and catches all my errors and fatalities.

Yes, this is pretty complex.
If I call `` `uvm_error()`` in a `qrun` job, it gets caught by a UVM report catcher which calls `$error()` which gets logged in `stats_log` which gets post-processed by `qrun_result.pl` which returns a nonzero exit status to my Python subprocess which triggers an assertion in my test subroutine which causes the `pytest` regression to fail.
Expand Down

0 comments on commit d59b867

Please sign in to comment.