Skip to content

Do not write to CWD in tests#74

Closed
lamontj wants to merge 1 commit into
akrylysov:mainfrom
lamontj:read-only-src-tree
Closed

Do not write to CWD in tests#74
lamontj wants to merge 1 commit into
akrylysov:mainfrom
lamontj:read-only-src-tree

Conversation

@lamontj
Copy link
Copy Markdown

@lamontj lamontj commented Sep 29, 2025

The source tree may be read-only during the build. Use a temporary directory for tests that need to modify the file system.

@Colecf
Copy link
Copy Markdown

Colecf commented Sep 29, 2025

For context, we've started using pogreb in the android build system, where source code is read-only during the build.

The source tree may be read-only during the build.  Use a temporary
directory for tests that need to modify the file system.
@lamontj
Copy link
Copy Markdown
Author

lamontj commented Sep 30, 2025

Test failures fixed

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.49%. Comparing base (76e9512) to head (4bcfc97).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #74   +/-   ##
=======================================
  Coverage   77.49%   77.49%           
=======================================
  Files          25       25           
  Lines        1804     1804           
=======================================
  Hits         1398     1398           
  Misses        281      281           
  Partials      125      125           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@akrylysov
Copy link
Copy Markdown
Owner

Thanks for the contribution! I pushed a commit with a slightly different approach that should automatically work for all future tests. It wraps the file systems used in tests with the Sub file system rooted in a temporary directory. Please let me know if it works for you 59b5287

@colincross
Copy link
Copy Markdown

Yes, 59b5287 works in our read-only tree. Thanks for the patch!

@akrylysov
Copy link
Copy Markdown
Owner

Thanks for confirming! I just merged my change to main, and I'm closing this PR.

@akrylysov akrylysov closed this Oct 17, 2025
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.

4 participants