summaryrefslogtreecommitdiff
path: root/tests/frontend
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-09-04 16:49:12 -0400
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-09-04 16:49:12 -0400
commit193bc3c195e9d0843d38f4a7e4eecac5b8daa1a2 (patch)
tree200db2d52b66343249b82c2f1092b1937838eedc /tests/frontend
parent60297032d9a95d88b5812dbd02b1e44f95db913e (diff)
downloadbuildstream-193bc3c195e9d0843d38f4a7e4eecac5b8daa1a2.tar.gz
Restructuring tests using the Repo and Cli
Make all the test batteries which run on all the source backends we have repo scaffoldings for discover the list of Repo implementations automatically.
Diffstat (limited to 'tests/frontend')
-rw-r--r--tests/frontend/buildcheckout.py5
-rw-r--r--tests/frontend/fetch.py6
-rw-r--r--tests/frontend/track.py6
-rw-r--r--tests/frontend/workspace.py7
4 files changed, 9 insertions, 15 deletions
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py
index e05b947b7..4a70c7c82 100644
--- a/tests/frontend/buildcheckout.py
+++ b/tests/frontend/buildcheckout.py
@@ -1,7 +1,6 @@
import os
import pytest
-from tests.testutils.runcli import cli
-from tests.testutils.repo import create_repo
+from tests.testutils import cli, create_repo, ALL_REPO_KINDS
from buildstream import _yaml
@@ -37,7 +36,7 @@ def test_build_checkout(datafiles, cli):
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("kind", [('git'), ('bzr'), ('ostree'), ('tar')])
+@pytest.mark.parametrize("kind", [(kind) for kind in ALL_REPO_KINDS])
def test_fetch_build_checkout(cli, tmpdir, datafiles, kind):
checkout = os.path.join(cli.directory, 'checkout')
project = os.path.join(datafiles.dirname, datafiles.basename)
diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py
index 23e6b3a35..e8c22c6f7 100644
--- a/tests/frontend/fetch.py
+++ b/tests/frontend/fetch.py
@@ -1,11 +1,9 @@
import os
import pytest
-from tests.testutils.runcli import cli
-from tests.testutils.repo import create_repo
+from tests.testutils import cli, create_repo, ALL_REPO_KINDS
from buildstream import _yaml
-
# Project directory
DATA_DIR = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
@@ -14,7 +12,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("kind", [('git'), ('bzr'), ('ostree'), ('tar')])
+@pytest.mark.parametrize("kind", [(kind) for kind in ALL_REPO_KINDS])
def test_fetch(cli, tmpdir, datafiles, kind):
project = os.path.join(datafiles.dirname, datafiles.basename)
bin_files_path = os.path.join(project, 'files', 'bin-files')
diff --git a/tests/frontend/track.py b/tests/frontend/track.py
index e4364e687..af899bd04 100644
--- a/tests/frontend/track.py
+++ b/tests/frontend/track.py
@@ -1,11 +1,9 @@
import os
import pytest
-from tests.testutils.runcli import cli
-from tests.testutils.repo import create_repo
+from tests.testutils import cli, create_repo, ALL_REPO_KINDS
from buildstream import _yaml
-
# Project directory
DATA_DIR = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
@@ -14,7 +12,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("kind", [('git'), ('bzr'), ('ostree'), ('tar')])
+@pytest.mark.parametrize("kind", [(kind) for kind in ALL_REPO_KINDS])
def test_track(cli, tmpdir, datafiles, kind):
project = os.path.join(datafiles.dirname, datafiles.basename)
dev_files_path = os.path.join(project, 'files', 'dev-files')
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index 7010f7d20..db0414a91 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -1,12 +1,11 @@
import os
import pytest
import shutil
-from tests.testutils.runcli import cli
-from tests.testutils.repo import create_repo
+from tests.testutils import cli, create_repo, ALL_REPO_KINDS
from buildstream import _yaml
-repo_kinds = [('git'), ('bzr'), ('ostree'), ('tar')]
+repo_kinds = [(kind) for kind in ALL_REPO_KINDS]
# Project directory
DATA_DIR = os.path.join(
@@ -161,7 +160,7 @@ def test_list(cli, tmpdir, datafiles, kind):
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("kind", [('git'), ('bzr'), ('ostree'), ('tar')])
+@pytest.mark.parametrize("kind", repo_kinds)
def test_build(cli, tmpdir, datafiles, kind):
element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, kind, False)
checkout = os.path.join(str(tmpdir), 'checkout')