Commit 97bbedbe authored by Phil Dawson's avatar Phil Dawson

plugintestutils: Rename 'plugintestutils' package to 'testing'

- Rename plugintestutils to testing.

- Don't run the tests from bst-plugins-template. This imports
  buildstream.plugintestutils so will have to be disabled to get
  through CI. This can be re nabled once bst-plugins-template has been
  patched.
parent 9d7d803b
Pipeline #57065578 passed with stages
in 172 minutes and 32 seconds
......@@ -7,7 +7,7 @@ include NEWS
include README.rst
# Data files required by BuildStream's generic source tests
recursive-include buildstream/plugintestutils/_sourcetests/project *
recursive-include buildstream/testing/_sourcetests/project *
# Documentation package includes
include doc/Makefile
......
......@@ -69,7 +69,7 @@ def register_repo_kind(kind, cls):
In addition, repo_kinds registred prior to
`sourcetests_collection_hook` being called will be automatically
used to test the basic behaviour of their associated source
plugins using the tests in `plugintestutils._sourcetests`.
plugins using the tests in `testing._sourcetests`.
Args:
kind (str): The kind of repo to create (a source plugin basename)
......
......@@ -22,8 +22,8 @@
import os
import pytest
from buildstream.plugintestutils import create_repo, ALL_REPO_KINDS
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import create_repo, ALL_REPO_KINDS
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream import _yaml
# Project directory
......
......@@ -31,7 +31,7 @@ class Repo():
Abstract class providing scaffolding for generating data to be
used with various sources. Subclasses of Repo may be registered to
run through the suite of generic source plugin tests provided in
buildstream.plugintestutils.
buildstream.testing.
Args:
directory (str): The base temp directory for the test
......
......@@ -20,4 +20,4 @@ useful for working on BuildStream itself.
buildstream.scriptelement
buildstream.sandbox.sandbox
buildstream.utils
buildstream.plugintestutils
buildstream.testing
......@@ -4,7 +4,7 @@ from unittest import mock
from buildstream import _yaml
from buildstream._cas.cascache import CACHE_SIZE_FILE
from buildstream._exceptions import ErrorDomain
from buildstream.plugintestutils import cli
from buildstream.testing import cli
from tests.testutils import create_element_size
......
......@@ -10,7 +10,7 @@ from buildstream.utils import _deduplicate
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli
from buildstream.testing.runcli import cli
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
......
......@@ -24,7 +24,7 @@ from unittest import mock
import pytest
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils import cli
from buildstream.testing import cli
from tests.testutils import create_element_size, update_element_size, wait_for_cache_granularity
......
......@@ -3,7 +3,7 @@ import shutil
import pytest
from buildstream import _yaml
from buildstream.plugintestutils import cli
from buildstream.testing import cli
from tests.testutils import create_artifact_share
......
......@@ -8,7 +8,7 @@ from buildstream import _yaml, _signals, utils
from buildstream._context import Context
from buildstream._project import Project
from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
from buildstream.plugintestutils import cli
from buildstream.testing import cli
from tests.testutils import create_artifact_share
......
......@@ -9,7 +9,7 @@ from buildstream._context import Context
from buildstream._project import Project
from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
from buildstream.storage._casbaseddirectory import CasBasedDirectory
from buildstream.plugintestutils import cli
from buildstream.testing import cli
from tests.testutils import create_artifact_share
......
......@@ -44,7 +44,7 @@ import os
import pytest
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
from buildstream.plugin import CoreWarnings
from buildstream import _yaml
from tests.testutils.site import HAVE_BZR, HAVE_GIT, HAVE_OSTREE, IS_LINUX, MACHINE_ARCH
......
......@@ -13,7 +13,7 @@
#
import os
import tempfile
from buildstream.plugintestutils.runcli import Cli
from buildstream.testing.runcli import Cli
# This weird try / except is needed, because this will be imported differently
# when pytest runner imports them vs when you run the updater directly from
......
......@@ -24,7 +24,7 @@ import shutil
import tempfile
import pytest
from buildstream._platform.platform import Platform
from buildstream.plugintestutils import register_repo_kind, sourcetests_collection_hook
from buildstream.testing import register_repo_kind, sourcetests_collection_hook
from tests.testutils.repo.git import Git
from tests.testutils.repo.bzr import Bzr
......@@ -177,6 +177,6 @@ register_repo_kind('zip', Zip)
# This hook enables pytest to collect the templated source tests from
# buildstream.plugintestutils
# buildstream.testing
def pytest_sessionstart(session):
sourcetests_collection_hook(session)
......@@ -6,8 +6,8 @@ import shutil
import pytest
from buildstream.plugintestutils import create_repo
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import create_repo
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream._exceptions import ErrorDomain
from buildstream import _yaml
......
......@@ -4,8 +4,8 @@
import os
import pytest
from buildstream.plugintestutils import cli_integration as cli # pylint: disable=unused-import
from buildstream.plugintestutils.integration import assert_contains
from buildstream.testing import cli_integration as cli # pylint: disable=unused-import
from buildstream.testing.integration import assert_contains
from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH
pytestmark = pytest.mark.integration
......
......@@ -4,8 +4,8 @@
import os
import pytest
from buildstream.plugintestutils import cli_integration as cli # pylint: disable=unused-import
from buildstream.plugintestutils.integration import assert_contains
from buildstream.testing import cli_integration as cli # pylint: disable=unused-import
from buildstream.testing.integration import assert_contains
import tests.testutils.patch as patch
from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH
......
......@@ -4,8 +4,8 @@
import os
import pytest
from buildstream.plugintestutils import cli_integration as cli # pylint: disable=unused-import
from buildstream.plugintestutils.integration import assert_contains
from buildstream.testing import cli_integration as cli # pylint: disable=unused-import
from buildstream.testing.integration import assert_contains
from tests.testutils.site import IS_LINUX
......
......@@ -4,8 +4,8 @@
import os
import pytest
from buildstream.plugintestutils import cli_integration as cli # pylint: disable=unused-import
from buildstream.plugintestutils.integration import assert_contains
from buildstream.testing import cli_integration as cli # pylint: disable=unused-import
from buildstream.testing.integration import assert_contains
from tests.testutils.site import HAVE_OSTREE, IS_LINUX, MACHINE_ARCH
......
......@@ -4,7 +4,7 @@
import os
import pytest
from buildstream.plugintestutils import cli_integration as cli # pylint: disable=unused-import
from buildstream.testing import cli_integration as cli # pylint: disable=unused-import
from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH
......
......@@ -4,7 +4,7 @@
import os
import pytest
from buildstream.plugintestutils import cli_integration as cli # pylint: disable=unused-import
from buildstream.testing import cli_integration as cli # pylint: disable=unused-import
from tests.testutils.site import IS_LINUX, HAVE_BWRAP, MACHINE_ARCH
pytestmark = pytest.mark.integration
......
......@@ -4,7 +4,7 @@
import os
import pytest
from buildstream.plugintestutils import cli_integration as cli # pylint: disable=unused-import
from buildstream.testing import cli_integration as cli # pylint: disable=unused-import
from tests.testutils.site import IS_LINUX, HAVE_BWRAP, MACHINE_ARCH
......
......@@ -78,13 +78,7 @@ if __name__ == "__main__":
# directly to it's pytest invocations
_, tmpdir, *pytest_args = sys.argv
ALL_EXTERNAL_PLUGINS = [
ExternalPluginRepo(
name='bst-plugins-template',
url='https://gitlab.com/BuildStream/bst-plugins-template.git',
ref='master'
),
]
ALL_EXTERNAL_PLUGINS = []
exit_code = 0
for plugin in ALL_EXTERNAL_PLUGINS:
......
......@@ -4,7 +4,7 @@
import os
import pytest
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.join(
......
......@@ -5,7 +5,7 @@ import os
import pytest
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import cli # pylint: disable=unused-import
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
......
......@@ -6,8 +6,8 @@ import textwrap
import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.plugintestutils import create_repo
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream.testing import create_repo
from tests.testutils import generate_junction
......
......@@ -8,8 +8,8 @@ import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.plugintestutils import create_repo
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream.testing import create_repo
from tests.testutils.site import HAVE_GIT
......
......@@ -4,7 +4,7 @@
import os
import pytest
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
......
......@@ -7,7 +7,7 @@ import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
from tests.testutils import override_platform_uname
......
......@@ -5,7 +5,7 @@ import os
import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
......
......@@ -5,7 +5,7 @@ import os
import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
......
......@@ -5,7 +5,7 @@ import os
import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
......
......@@ -4,7 +4,7 @@
import os
import pytest
from buildstream import _yaml
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
......
......@@ -5,7 +5,7 @@ import os
import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
......
......@@ -7,7 +7,7 @@ import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
from tests.testutils import override_platform_uname
......
......@@ -4,7 +4,7 @@
import os
import pytest
from buildstream import _yaml
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
......
......@@ -5,7 +5,7 @@ import os
import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.join(
......
......@@ -5,7 +5,7 @@ import os
import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import cli # pylint: disable=unused-import
from tests.testutils import filetypegenerator
......
......@@ -4,7 +4,7 @@
import os
import pytest
from buildstream import _yaml
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.join(
......
......@@ -8,7 +8,7 @@ import pytest
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
......
......@@ -24,7 +24,7 @@
import os
import pytest
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import cli # pylint: disable=unused-import
from tests.testutils import create_artifact_share
......
......@@ -11,7 +11,7 @@ import pytest
from tests.testutils.site import IS_WINDOWS
from tests.testutils import generate_junction, yaml_file_get_provenance
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
......
......@@ -9,8 +9,8 @@ import itertools
import pytest
from buildstream import _yaml
from buildstream.plugintestutils import create_repo
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import create_repo
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream._exceptions import ErrorDomain
from . import configure_project
......
......@@ -3,7 +3,7 @@
import os
import pytest
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.join(
......
......@@ -3,7 +3,7 @@
import os
import pytest
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.join(
......
......@@ -8,7 +8,7 @@ import pytest
from buildstream.plugin import CoreWarnings
from buildstream._exceptions import ErrorDomain
from buildstream import _yaml
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
TOP_DIR = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
......
......@@ -2,8 +2,8 @@
# pylint: disable=redefined-outer-name
import os
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.plugintestutils import create_repo
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream.testing import create_repo
from buildstream import _yaml
......
......@@ -5,8 +5,8 @@ import os
import pytest
from tests.testutils import generate_junction, yaml_file_get_provenance
from buildstream.plugintestutils import create_repo
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import create_repo
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
......
......@@ -2,7 +2,7 @@
# pylint: disable=redefined-outer-name
import pytest
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
def assert_help(cli_output):
......
......@@ -3,7 +3,7 @@
import os
import pytest
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream import _yaml
from buildstream._frontend.app import App
......
......@@ -6,11 +6,11 @@ import re
import pytest
from buildstream.plugintestutils import create_repo
from buildstream.testing import create_repo
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.join(
......
......@@ -5,8 +5,8 @@ import os
import pytest
from buildstream import _yaml
from buildstream.plugintestutils import create_repo
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import create_repo
from buildstream.testing import cli # pylint: disable=unused-import
# Project directory
......
......@@ -4,8 +4,8 @@
import os
import pytest
from buildstream.plugintestutils import create_repo
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import create_repo
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream import _yaml
# Project directory
......
......@@ -3,7 +3,7 @@
import os
import pytest
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
from buildstream.testing.runcli import cli # pylint: disable=unused-import
from buildstream._exceptions import ErrorDomain
from buildstream import _yaml
from buildstream.plugin import CoreWarnings
......
......@@ -6,7 +6,7 @@ import shutil
import stat
import pytest
from buildstream import utils
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import cli # pylint: disable=unused-import
from tests.testutils import create_artifact_share, generate_junction
......
......@@ -27,7 +27,7 @@ import os
import pytest
from buildstream._exceptions import ErrorDomain
from buildstream.plugintestutils import cli # pylint: disable=unused-import
from buildstream.testing import cli # pylint: disable=unused-import
from tests.testutils import create_artifact_share, create_element_size, generate_junction, wait_for_cache_granularity
......
......@@ -3,7 +3,7 @@
import os
import pytest
from buildstream.plugintestutils import cli # pylint: disable=unused-import