diff options
author | Phil Dawson <phil.dawson@codethink.co.uk> | 2019-03-26 09:49:17 +0000 |
---|---|---|
committer | Phil Dawson <phil.dawson@codethink.co.uk> | 2019-04-12 16:06:19 +0100 |
commit | 16a28c0316a64189cb8c396c43b570764a83d33b (patch) | |
tree | b0cf6a513b6f3da080fc5f5563625e624f0548d1 /tests/conftest.py | |
parent | c30f4a56e1f802f338e4b248b2ba925e479d3418 (diff) | |
download | buildstream-16a28c0316a64189cb8c396c43b570764a83d33b.tar.gz |
Make templated source tests available in buildstream.plugintestutils
Diffstat (limited to 'tests/conftest.py')
-rwxr-xr-x | tests/conftest.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 30577870f..fefd2f755 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # # Copyright (C) 2018 Codethink Limited +# Copyright (C) 2019 Bloomberg Finance LLP # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -23,6 +24,14 @@ import shutil import tempfile import pytest from buildstream._platform.platform import Platform +from buildstream.plugintestutils import register_repo_kind, sourcetests_collection_hook + +from tests.testutils.repo.git import Git +from tests.testutils.repo.bzr import Bzr +from tests.testutils.repo.ostree import OSTree +from tests.testutils.repo.tar import Tar +from tests.testutils.repo.zip import Zip + # # This file is loaded by pytest, we use it to add a custom @@ -155,3 +164,19 @@ def clean_platform_cache(): @pytest.fixture(autouse=True) def ensure_platform_cache_is_clean(): clean_platform_cache() + + +################################################# +# Setup for templated source tests # +################################################# +register_repo_kind('git', Git) +register_repo_kind('bzr', Bzr) +register_repo_kind('ostree', OSTree) +register_repo_kind('tar', Tar) +register_repo_kind('zip', Zip) + + +# This hook enables pytest to collect the templated source tests from +# buildstream.plugintestutils +def pytest_sessionstart(session): + sourcetests_collection_hook(session) |