lsils / mockturtle

C++ logic network library
MIT License
191 stars 133 forks source link

Clean up handling of temporary files in test suite #652

Closed rocallahan closed 2 weeks ago

rocallahan commented 1 month ago

The current working directory may not be writable so it's better to write files explicitly to /tmp and clean them up afterward.

rocallahan commented 1 month ago

I need to work out a Windows-compatible solution here.

rocallahan commented 4 weeks ago

Actually it looks like a lot of tests assume the current working directory is writable, so we should fix this another way.

codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 50.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 83.66%. Comparing base (93a37e8) to head (c6b66cf). Report is 9 commits behind head on master.

:exclamation: Current head c6b66cf differs from pull request most recent head 1db53c9

Please upload reports for the commit 1db53c9 to get more accurate results.

Files Patch % Lines
include/mockturtle/io/serialize.hpp 50.00% 12 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #652 +/- ## ========================================== + Coverage 83.47% 83.66% +0.19% ========================================== Files 187 187 Lines 29692 29740 +48 ========================================== + Hits 24784 24881 +97 + Misses 4908 4859 -49 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

costamag commented 2 weeks ago

@aletempiac, the coverage report is triggered by the branching added by @rocallahan. Testing all of them requires considering many cases, and from the code we can see that he is giving us a better handling of the files. Do you suggest to address the coverage issue or can we proceed with merging this PR?

rocallahan commented 2 weeks ago

Hmm, the tests pass for me.

costamag commented 2 weeks ago

Dear @rocallahan,this is great, thank you for the tests!