You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ro...@apache.org on 2020/12/29 13:38:33 UTC

[buildstream] 02/20: sandbox.py: Re-add the __allow_real_directory check, to stop us using CASCache on unsupported elements

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

root pushed a commit to branch jmac/virtual_directory_tests
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 096a315e7d58a01f0ab4e1749d6c673fa676ac06
Author: Jim MacArthur <ji...@codethink.co.uk>
AuthorDate: Fri Sep 14 13:48:08 2018 +0100

    sandbox.py: Re-add the __allow_real_directory check, to stop us using CASCache on unsupported elements
---
 buildstream/sandbox/sandbox.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildstream/sandbox/sandbox.py b/buildstream/sandbox/sandbox.py
index 9d34f01..63b1ff8 100644
--- a/buildstream/sandbox/sandbox.py
+++ b/buildstream/sandbox/sandbox.py
@@ -140,7 +140,7 @@ class Sandbox():
         if not self._vdir:
             # BST_CAS_DIRECTORIES is a deliberately hidden environment variable which
             # can be used to switch on CAS-based directories for testing.
-            if 'BST_CAS_DIRECTORIES' in os.environ:
+            if 'BST_CAS_DIRECTORIES' in os.environ and not self.__allow_real_directory:
                 self._vdir = CasBasedDirectory(self.__context, ref=None)
             else:
                 self._vdir = FileBasedDirectory(self._root)