This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch willsalmon/tar_plugin_move in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 62457c56beac27529b1e52d421b15baf3a070d60 Author: William Salmon <[email protected]> AuthorDate: Wed Mar 25 11:57:05 2020 +0000 proof of concept skip --- src/buildstream/testing/_sourcetests/source_determinism.py | 7 ++++++- src/buildstream/testing/_utils/site.py | 7 +++++++ tests/cachekey/cachekey.py | 3 ++- tests/frontend/mirror.py | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/buildstream/testing/_sourcetests/source_determinism.py b/src/buildstream/testing/_sourcetests/source_determinism.py index b834f32..2533e00 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, CASD_SEPARATE_USER +from .._utils.site import HAVE_SANDBOX, CASD_SEPARATE_USER, HAVE_TAR from .. import create_repo from .. import cli # pylint: disable=unused-import from .utils import kind # pylint: disable=unused-import @@ -50,6 +50,11 @@ def create_test_directory(*path, mode=0o644): @pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox") [email protected](not HAVE_TAR, reason="WIP test for bst external") [email protected]( + HAVE_SANDBOX == "buildbox-run" and CASD_SEPARATE_USER, + reason="Flaky due to timestamps: https://gitlab.com/BuildStream/buildstream/issues/1218", +) def test_deterministic_source_umask(cli, tmpdir, datafiles, kind): if CASD_SEPARATE_USER and kind == "ostree": pytest.xfail("The ostree plugin ignores the umask") diff --git a/src/buildstream/testing/_utils/site.py b/src/buildstream/testing/_utils/site.py index a04f652..19747e5 100644 --- a/src/buildstream/testing/_utils/site.py +++ b/src/buildstream/testing/_utils/site.py @@ -78,3 +78,10 @@ if HAVE_SANDBOX == "buildbox-run": BUILDBOX_RUN = os.path.basename(os.readlink(path)) except (ProgramNotFoundError, OSError): pass + +HAVE_TAR = None +try: + import buildstream.plugins.elements.tar_element + HAVE_TAR = True +except: + pass \ No newline at end of file diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py index b669bac..a2de414 100644 --- a/tests/cachekey/cachekey.py +++ b/tests/cachekey/cachekey.py @@ -45,7 +45,7 @@ import os import pytest from buildstream.testing.runcli import cli # pylint: disable=unused-import -from buildstream.testing._utils.site import HAVE_BZR, HAVE_GIT, IS_LINUX, MACHINE_ARCH +from buildstream.testing._utils.site import HAVE_BZR, HAVE_GIT, IS_LINUX, MACHINE_ARCH, HAVE_TAR from buildstream.plugin import CoreWarnings from buildstream import _yaml @@ -157,6 +157,7 @@ DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project",) @pytest.mark.skipif(not IS_LINUX, reason="Only available on linux") @pytest.mark.skipif(HAVE_BZR is False, reason="bzr is not available") @pytest.mark.skipif(HAVE_GIT is False, reason="git is not available") [email protected](not HAVE_TAR, reason="git is not available") @pytest.mark.datafiles(DATA_DIR) def test_cache_key(datafiles, cli): project = str(datafiles) diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py index f71cb55..9931216 100644 --- a/tests/frontend/mirror.py +++ b/tests/frontend/mirror.py @@ -7,6 +7,7 @@ import pytest from buildstream import _yaml from buildstream.testing import create_repo from buildstream.testing import cli # pylint: disable=unused-import +from buildstream.testing._utils.site import HAVE_TAR # Project directory @@ -56,6 +57,7 @@ def generate_project(): @pytest.mark.datafiles(DATA_DIR) @pytest.mark.parametrize("ref_storage", [("inline"), ("project.refs")]) @pytest.mark.parametrize("mirror", [("no-mirror"), ("mirror"), ("unrelated-mirror")]) [email protected](not HAVE_TAR, reason="WIP test for bst external") def test_mirror_fetch_ref_storage(cli, tmpdir, datafiles, ref_storage, mirror): bin_files_path = os.path.join(str(datafiles), "files", "bin-files", "usr") dev_files_path = os.path.join(str(datafiles), "files", "dev-files", "usr")
