-
Notifications
You must be signed in to change notification settings - Fork 1.2k
pytest and TMPDIR housekeeping #6036
Copy link
Copy link
Closed
Labels
good first issueThis issue can be resolved by someone who is not familiar with the codebase. A good starting issue.This issue can be resolved by someone who is not familiar with the codebase. A good starting issue.kind/healthFor CI/testing/release process/refactoring/technical debt itemsFor CI/testing/release process/refactoring/technical debt itemsno QC knowledge neededWant to contribute to Cirq, but don't know quantum computing? This issue is for you.Want to contribute to Cirq, but don't know quantum computing? This issue is for you.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on
Metadata
Metadata
Assignees
Labels
good first issueThis issue can be resolved by someone who is not familiar with the codebase. A good starting issue.This issue can be resolved by someone who is not familiar with the codebase. A good starting issue.kind/healthFor CI/testing/release process/refactoring/technical debt itemsFor CI/testing/release process/refactoring/technical debt itemsno QC knowledge neededWant to contribute to Cirq, but don't know quantum computing? This issue is for you.Want to contribute to Cirq, but don't know quantum computing? This issue is for you.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on
pytest leaves behind a LOT of temporary files
After executing all cirq unit tests with pytest the root temporary directory contains 31 leftover files and 38 leftover directories taking about 30G of disk space in total. The majority of that is taken by /tmp/cirq-pytest which has 59 virtual environments - 3 base environments and 56 per each isolated notebook test.
Some ideas how to reduce disk usage in isolated_notebook_test
pip installcommands run in the notebook should then keep their base environment unchanged.rsync -a --delete base-backup/ base/before each test. This would probably need several base environments for each parallel pytest worker.Here is how I checked for the leftover files (docker tests are not set up on my workstation).
Note: my work tree had a change in the isolated_notebook_test.py which makes it execute all isolated notebook tests.
Cirq version
1.2.0.dev at 8b97aa5