summaryrefslogtreecommitdiff
path: root/tests/sources/tar.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sources/tar.py')
-rw-r--r--tests/sources/tar.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/sources/tar.py b/tests/sources/tar.py
index 9789a4484..fac6f3f8b 100644
--- a/tests/sources/tar.py
+++ b/tests/sources/tar.py
@@ -279,10 +279,10 @@ def test_stage_default_basedir_lzip(cli, tmpdir, datafiles, srcdir):
# Test that tarballs with read-only files work
# a - contains read-only files in a writable directory
# b - root directory has read-only permission
-# c - contains one file that has no read nor write permissions
+# c - contains one file that has no read nor write permissions. Base-dir set to '' to extract root of tarball
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'read-only'))
-@pytest.mark.parametrize("tar_name", ["a", "b", "c"])
-def test_read_only_dir(cli, tmpdir, datafiles, tar_name):
+@pytest.mark.parametrize("tar_name, base_dir", [("a", "*"), ("b", '*'), ("c", '')])
+def test_read_only_dir(cli, tmpdir, datafiles, tar_name, base_dir):
try:
project = str(datafiles)
generate_project(project, tmpdir)
@@ -297,7 +297,7 @@ def test_read_only_dir(cli, tmpdir, datafiles, tar_name):
'kind': 'tar',
'url': 'tmpdir:/{}'.format(tar_file),
'ref': 'foo',
- 'base-dir': ''
+ 'base-dir': base_dir
}
]
}, bst_path)