zachjs / sv2v

SystemVerilog to Verilog conversion
BSD 3-Clause "New" or "Revised" License
497 stars 50 forks source link

Feature request: Documentation for contributing and writing tests #243

Closed dwRchyngqxs closed 11 months ago

dwRchyngqxs commented 1 year ago

Hello, I'm writing a PR but I'm struggling with writing tests. After modifying the code in my PR, some tests fails, but there is no detail about what the output was or the reference is supposed to be.

I think some files are missing to explain how to contribute, a CONTRIBUTING in the root directory could help. The rationale for the directory structure is not explained, would it be possible to explain what the test suite are? For instance a README in test or in each subdirectory. What the testing is and what command are run, is not clear. The only thing I understand from your explanations in my PR is that a .v file along a .sv file means a reference output. Some .sv are accompanied by _tb.v files and some are alone (not even a .v file) and what is done for these test is not explained. Would it be possible to explain that? For instance a README in test.

zachjs commented 1 year ago

You've raised a great point here. I think I can address these shortcomings.

Regarding test documentation, I just pushed a129e3bc6846040babf005c1649ad905374f891f to add test/README.md. I hope this addresses your questions above. If there's anything more that is unclear about the tests, please let me know!

I haven't yet added a CONTRIBUTING file to address contributing to sv2v in general as opposed to adding/debugging tests as discussed above. I'm not yet sure what I would put there, but I can imagine codifying certain standards long-term, e.g., for test coverage and updating the changelog.