Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up coverage files generated by test #522

Merged
merged 2 commits into from
Mar 7, 2022
Merged

clean up coverage files generated by test #522

merged 2 commits into from
Mar 7, 2022

Conversation

aviatesk
Copy link
Member

@aviatesk aviatesk commented Mar 7, 2022

I found generated coverage files corresponding to source files a bit noisy, e.g. in a source tree view in my local editor.
I think we can just clean them up after test?

@aviatesk aviatesk requested a review from simeonschaub March 7, 2022 04:46
@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #522 (e265855) into master (1a92d9a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #522   +/-   ##
=======================================
  Coverage   86.95%   86.95%           
=======================================
  Files          12       12           
  Lines        2422     2422           
=======================================
  Hits         2106     2106           
  Misses        316      316           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a92d9a...e265855. Read the comment docs.

@simeonschaub
Copy link
Collaborator

I wonder whether there's a way to get the exact extension of the coverage files generated by this specific spawned Julia session. Just might be a little bit cleaner since there might already be coverage data from previous profiles in the src folder which we don't necessarily want to delete if anyone runs the tests.

@simeonschaub
Copy link
Collaborator

Ok, I looked into it and it seems to just use the pid of the process, so you could do something like:

p = run(`julia -E 'Libc.getpid()'`; wait=false)
pid = Libc.getpid(p)
wait(p)

and then only delete files ending in .$pid.cov.

@aviatesk
Copy link
Member Author

aviatesk commented Mar 7, 2022

Thanks! Now I think this deletes coverage files more nicely.

@aviatesk aviatesk merged commit 9814c68 into master Mar 7, 2022
@aviatesk aviatesk deleted the avi/cov branch March 7, 2022 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants