summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-11-21 07:16:26 +0100
committerJürg Billeter <j@bitron.ch>2019-12-03 12:06:31 +0000
commite090301959d7ef5a5de8e4c0e3a1f373d2c4c7c5 (patch)
tree68ee4807563ac0828377feaeaa8d577a28ca5a0b /src
parent1f124cfd0e4cc913531f3846c928a6d56ffc409f (diff)
downloadbuildstream-e090301959d7ef5a5de8e4c0e3a1f373d2c4c7c5.tar.gz
tests: source_determinism.py: Do not use too restrictive test umasksjuerg/casd-separate-user
To protect the local cache of buildbox-casd from corruption without the use of FUSE, buildbox-casd has to run as a different user. Use less restrictive umasks in the source determinism tests to allow buildbox-casd to function when it is running as a separate user.
Diffstat (limited to 'src')
-rw-r--r--src/buildstream/testing/_sourcetests/source_determinism.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/buildstream/testing/_sourcetests/source_determinism.py b/src/buildstream/testing/_sourcetests/source_determinism.py
index 27664e0c2..f84d18ba2 100644
--- a/src/buildstream/testing/_sourcetests/source_determinism.py
+++ b/src/buildstream/testing/_sourcetests/source_determinism.py
@@ -23,7 +23,7 @@ import os
import pytest
from buildstream import _yaml
-from .._utils.site import HAVE_SANDBOX
+from .._utils.site import HAVE_SANDBOX, CASD_SEPARATE_USER
from .. import create_repo
from .. import cli # pylint: disable=unused-import
from .utils import kind # pylint: disable=unused-import
@@ -101,4 +101,9 @@ def test_deterministic_source_umask(cli, tmpdir, datafiles, kind):
os.umask(old_umask)
cli.remove_artifact_from_cache(project, element_name)
- assert get_value_for_umask(0o022) == get_value_for_umask(0o077)
+ if CASD_SEPARATE_USER:
+ # buildbox-casd running as separate user of the same group can't
+ # function in a test environment with a too restrictive umask.
+ assert get_value_for_umask(0o002) == get_value_for_umask(0o007)
+ else:
+ assert get_value_for_umask(0o022) == get_value_for_umask(0o077)