diff options
Diffstat (limited to 'tests/testutils')
-rw-r--r-- | tests/testutils/repo/ostree.py | 48 | ||||
-rw-r--r-- | tests/testutils/site.py | 2 |
2 files changed, 1 insertions, 49 deletions
diff --git a/tests/testutils/repo/ostree.py b/tests/testutils/repo/ostree.py deleted file mode 100644 index c43f39ef2..000000000 --- a/tests/testutils/repo/ostree.py +++ /dev/null @@ -1,48 +0,0 @@ -import subprocess - -import pytest - -from buildstream.testing import Repo -from .. import site - - -class OSTree(Repo): - - def __init__(self, directory, subdir): - if not site.HAVE_OSTREE_CLI or not site.HAVE_OSTREE: - pytest.skip("ostree cli is not available") - - super(OSTree, self).__init__(directory, subdir) - self.ostree = site.OSTREE_CLI - - def create(self, directory): - subprocess.call([self.ostree, 'init', - '--repo', self.repo, - '--mode', 'archive-z2']) - subprocess.call([self.ostree, 'commit', - '--repo', self.repo, - '--branch', 'master', - '--subject', 'Initial commit', - directory]) - - latest = self.latest_commit() - - return latest - - def source_config(self, ref=None): - config = { - 'kind': 'ostree', - 'url': 'file://' + self.repo, - 'track': 'master' - } - if ref is not None: - config['ref'] = ref - - return config - - def latest_commit(self): - return subprocess.check_output([ - self.ostree, 'rev-parse', - '--repo', self.repo, - 'master' - ], universal_newlines=True).strip() diff --git a/tests/testutils/site.py b/tests/testutils/site.py index 17c84cd8d..ef315efd6 100644 --- a/tests/testutils/site.py +++ b/tests/testutils/site.py @@ -32,7 +32,7 @@ except ProgramNotFoundError: HAVE_OSTREE_CLI = False try: - from buildstream import _ostree # pylint: disable=unused-import + from bst_plugins_experimental.sources import _ostree # pylint: disable=unused-import HAVE_OSTREE = True except (ImportError, ValueError): HAVE_OSTREE = False |