diff options
author | Tristan Maat <tristan.maat@codethink.co.uk> | 2019-11-08 12:25:46 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-11-25 09:45:22 +0100 |
commit | 18f8e38161d58cf31a56f1de53d5cda9cb4d470b (patch) | |
tree | 604d3fc75780ee3c942526bc16b6b228b379ef94 | |
parent | 2762c9303954978ea42e6112827e466b6648d310 (diff) | |
download | buildstream-18f8e38161d58cf31a56f1de53d5cda9cb4d470b.tar.gz |
testing/integration.py: Respect umask for the integration cache
-rw-r--r-- | src/buildstream/testing/integration.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buildstream/testing/integration.py b/src/buildstream/testing/integration.py index 584d7da1b..9a1a48816 100644 --- a/src/buildstream/testing/integration.py +++ b/src/buildstream/testing/integration.py @@ -28,6 +28,8 @@ import tempfile import pytest +from buildstream import utils + # Return a list of files relative to the given directory def walk_dir(root): @@ -66,6 +68,8 @@ class IntegrationCache: # the artifacts directory try: self.cachedir = tempfile.mkdtemp(dir=self.root, prefix="cache-") + # Apply mode allowed by umask + os.chmod(self.cachedir, 0o777 & ~utils.get_umask()) except OSError as e: raise AssertionError("Unable to create test directory !") from e |