diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2020-06-10 14:28:04 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-06-10 14:28:04 +0000 |
commit | 6f335e26819413d6d429aa13404f5d30000aa449 (patch) | |
tree | 634f6be31898ecc4233fec14791a35aef98aac36 /tests/frontend/pull.py | |
parent | 57c731299c0851d34774ffdcdd5960503c1f8fec (diff) | |
parent | 725435f79b4a0284693415c5367cb9013fcd8cfd (diff) | |
download | buildstream-6f335e26819413d6d429aa13404f5d30000aa449.tar.gz |
Merge branch 'juerg/object-file-mode' into 'master'
cascache.py: Fix file modes in checkout()
See merge request BuildStream/buildstream!1959
Diffstat (limited to 'tests/frontend/pull.py')
-rw-r--r-- | tests/frontend/pull.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py index 6a5a41977..c1fa76ab0 100644 --- a/tests/frontend/pull.py +++ b/tests/frontend/pull.py @@ -442,6 +442,8 @@ def test_pull_access_rights(cli, tmpdir, datafiles): project = str(datafiles) checkout = os.path.join(str(tmpdir), "checkout") + umask = utils.get_umask() + # Work-around datafiles not preserving mode os.chmod(os.path.join(project, "files/bin-files/usr/bin/hello"), 0o0755) @@ -467,15 +469,15 @@ def test_pull_access_rights(cli, tmpdir, datafiles): st = os.lstat(os.path.join(checkout, "usr/include/pony.h")) assert stat.S_ISREG(st.st_mode) - assert stat.S_IMODE(st.st_mode) == 0o0644 + assert stat.S_IMODE(st.st_mode) == 0o0666 & ~umask st = os.lstat(os.path.join(checkout, "usr/bin/hello")) assert stat.S_ISREG(st.st_mode) - assert stat.S_IMODE(st.st_mode) == 0o0755 + assert stat.S_IMODE(st.st_mode) == 0o0777 & ~umask st = os.lstat(os.path.join(checkout, "usr/share/big-file")) assert stat.S_ISREG(st.st_mode) - assert stat.S_IMODE(st.st_mode) == 0o0644 + assert stat.S_IMODE(st.st_mode) == 0o0666 & ~umask shutil.rmtree(checkout) @@ -493,15 +495,15 @@ def test_pull_access_rights(cli, tmpdir, datafiles): st = os.lstat(os.path.join(checkout, "usr/include/pony.h")) assert stat.S_ISREG(st.st_mode) - assert stat.S_IMODE(st.st_mode) == 0o0644 + assert stat.S_IMODE(st.st_mode) == 0o0666 & ~umask st = os.lstat(os.path.join(checkout, "usr/bin/hello")) assert stat.S_ISREG(st.st_mode) - assert stat.S_IMODE(st.st_mode) == 0o0755 + assert stat.S_IMODE(st.st_mode) == 0o0777 & ~umask st = os.lstat(os.path.join(checkout, "usr/share/big-file")) assert stat.S_ISREG(st.st_mode) - assert stat.S_IMODE(st.st_mode) == 0o0644 + assert stat.S_IMODE(st.st_mode) == 0o0666 & ~umask # Tests `bst artifact pull $artifact_ref` |