diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-22 17:36:47 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-22 17:36:47 +0900 |
commit | b974a1b76688f8fb5f9211fc52506b2aa1cfa04b (patch) | |
tree | 3875f1d05d39f63b3857e86aaff4b20cd011ba04 /tests/sources | |
parent | 194284498835395ff3ef52a1776cf8f322e60d49 (diff) | |
download | buildstream-b974a1b76688f8fb5f9211fc52506b2aa1cfa04b.tar.gz |
tests/sources/generic.py: Removing test, no tests should ever be added here
New tests only via the frontend cli, never mucking about with source APIs
directly, this whole directory needs to eventually be removed.
This test was also testing the wrong condition, it's okay that a source
stage to a non-empty directory, it's not okay that an element stages
it's group of sources to a non-empty directory.
Diffstat (limited to 'tests/sources')
-rw-r--r-- | tests/sources/generic.py | 28 | ||||
-rw-r--r-- | tests/sources/generic/elements/install-to-build.bst | 4 | ||||
-rw-r--r-- | tests/sources/generic/files/build-files/buildstream/build/test | 1 | ||||
-rw-r--r-- | tests/sources/generic/project.conf | 4 |
4 files changed, 0 insertions, 37 deletions
diff --git a/tests/sources/generic.py b/tests/sources/generic.py deleted file mode 100644 index 6365d8d90..000000000 --- a/tests/sources/generic.py +++ /dev/null @@ -1,28 +0,0 @@ -import os -import pathlib - -import pytest - -from .fixture import Setup -from buildstream.exceptions import SourceError - -# Project directory -DATA_DIR = os.path.join( - os.path.dirname(os.path.realpath(__file__)), - "generic", -) - - -@pytest.mark.datafiles(DATA_DIR) -def test_staging_to_existing(tmpdir, datafiles): - setup = Setup(datafiles, 'elements/install-to-build.bst', tmpdir) - - # Create a file in the build directory (/buildstream/build) - build_dir = pathlib.Path(os.path.join(setup.context.builddir, - 'buildstream', 'build')) - build_dir.mkdir(parents=True) - build_dir.joinpath('file').touch() - - # Ensure that we can't stage to an already filled build directory - with pytest.raises(SourceError): - setup.source._stage(setup.context.builddir) diff --git a/tests/sources/generic/elements/install-to-build.bst b/tests/sources/generic/elements/install-to-build.bst deleted file mode 100644 index a892cc69c..000000000 --- a/tests/sources/generic/elements/install-to-build.bst +++ /dev/null @@ -1,4 +0,0 @@ -kind: import -sources: -- kind: local - path: files/build-files diff --git a/tests/sources/generic/files/build-files/buildstream/build/test b/tests/sources/generic/files/build-files/buildstream/build/test deleted file mode 100644 index 9daeafb98..000000000 --- a/tests/sources/generic/files/build-files/buildstream/build/test +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/tests/sources/generic/project.conf b/tests/sources/generic/project.conf deleted file mode 100644 index 854e38693..000000000 --- a/tests/sources/generic/project.conf +++ /dev/null @@ -1,4 +0,0 @@ -# Project config for frontend build test -name: test - -element-path: elements |