You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ju...@apache.org on 2021/10/24 18:35:40 UTC

[buildstream] 01/01: testing/integration.py: Use `utils._force_rmtree()` for cache cleanup

This is an automated email from the ASF dual-hosted git repository.

juergbi pushed a commit to branch juerg/integration-cache
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 754388b0465015a84f045d0ee6c73b82c403bdbb
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Sun Oct 24 20:34:08 2021 +0200

    testing/integration.py: Use `utils._force_rmtree()` for cache cleanup
    
    It may be necessary to fix permissions to remove the cleanup the cache
    directory.
---
 src/buildstream/testing/integration.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/buildstream/testing/integration.py b/src/buildstream/testing/integration.py
index 269b3d3..6a4d7cf 100644
--- a/src/buildstream/testing/integration.py
+++ b/src/buildstream/testing/integration.py
@@ -104,10 +104,10 @@ def integration_cache(request):
     # Clean up the artifacts after each test session - we only want to
     # cache sources between tests
     try:
-        shutil.rmtree(cache.cachedir)
+        utils._force_rmtree(cache.cachedir)
     except FileNotFoundError:
         pass
     try:
-        shutil.rmtree(os.path.join(cache.root, "cas"))
+        utils._force_rmtree(os.path.join(cache.root, "cas"))
     except FileNotFoundError:
         pass