diff options
| author | 0xTehuti <xtehuti@agentmail.to> | 2026-11-22 23:59:52 +0100 |
|---|---|---|
| committer | 0xTehuti <xtehuti@agentmail.to> | 2026-11-22 23:59:52 +0100 |
| commit | bc425352cdc355523de5bafafeb1135bb5f28fed (patch) | |
| tree | 742e33e6d505e997278287d06d0f061599c87990 /runtime/test/command_list_test.cpp | |
| parent | aa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff) | |
scripts: robust recursive directory cleanup with readonly reset in build_llvm_mc.ps1 (BUILD-139)
When cleaning up temporary build and clone directories on Windows, files with
the ReadOnly attribute (such as git objects in the sparse clone) cause
PowerShell's Remove-Item to fail with an UnauthorizedAccessException or
IOException, leaving gigabytes of files behind in $Temp.
Implement Remove-DirectoryRobust:
1. Recursively strip ReadOnly attributes across all nested files and directories.
2. Retry Remove-Item with backoff for brief file handle locks.
3. Fall back to Windows cmd rmdir /s /q which handles read-only attribute trees natively.
4. Add unit test in tests/test_build_llvm_mc_cleanup.py verifying teardown of read-only hierarchies.
Diffstat (limited to 'runtime/test/command_list_test.cpp')
0 files changed, 0 insertions, 0 deletions