You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/02/04 07:49:17 UTC

[buildstream] 07/08: Remove integration tests for moved plugins

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch coldtom/external-plugins
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit c21fdd559356c88465eac352a302284f8495bf7e
Author: Thomas Coldrick <th...@codethink.co.uk>
AuthorDate: Fri Sep 20 10:09:37 2019 +0100

    Remove integration tests for moved plugins
---
 tests/integration/cmake.py                         |  68 ---------------------
 tests/integration/make.py                          |  52 ----------------
 .../project/elements/cmake/cmakeconfroothello.bst  |  15 -----
 .../project/elements/cmake/cmakehello.bst          |  10 ---
 .../project/elements/make/makehello.bst            |  10 ---
 tests/integration/project/files/cmakehello.tar.gz  | Bin 10240 -> 0 bytes
 tests/integration/project/files/makehello.tar.gz   | Bin 432 -> 0 bytes
 7 files changed, 155 deletions(-)

diff --git a/tests/integration/cmake.py b/tests/integration/cmake.py
deleted file mode 100644
index a0298c2..0000000
--- a/tests/integration/cmake.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# Pylint doesn't play well with fixtures and dependency injection from pytest
-# pylint: disable=redefined-outer-name
-
-import os
-import pytest
-
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
-from buildstream.testing._utils.site import HAVE_SANDBOX
-
-
-pytestmark = pytest.mark.integration
-
-
-DATA_DIR = os.path.join(
-    os.path.dirname(os.path.realpath(__file__)),
-    "project"
-)
-
-
-@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_cmake_build(cli, datafiles):
-    project = str(datafiles)
-    checkout = os.path.join(cli.directory, 'checkout')
-    element_name = 'cmake/cmakehello.bst'
-
-    result = cli.run(project=project, args=['build', element_name])
-    assert result.exit_code == 0
-
-    result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
-    assert result.exit_code == 0
-
-    assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello'])
-
-
-@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-@pytest.mark.xfail(HAVE_SANDBOX == 'buildbox', reason='Not working with BuildBox')
-def test_cmake_confroot_build(cli, datafiles):
-    project = str(datafiles)
-    checkout = os.path.join(cli.directory, 'checkout')
-    element_name = 'cmake/cmakeconfroothello.bst'
-
-    result = cli.run(project=project, args=['build', element_name])
-    assert result.exit_code == 0
-
-    result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
-    assert result.exit_code == 0
-
-    assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello'])
-
-
-@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_cmake_run(cli, datafiles):
-    project = str(datafiles)
-    element_name = 'cmake/cmakehello.bst'
-
-    result = cli.run(project=project, args=['build', element_name])
-    assert result.exit_code == 0
-
-    result = cli.run(project=project, args=['shell', element_name, '/usr/bin/hello'])
-    assert result.exit_code == 0
-
-    assert result.output == """Hello World!
-This is hello.
-"""
diff --git a/tests/integration/make.py b/tests/integration/make.py
deleted file mode 100644
index 664e7ca..0000000
--- a/tests/integration/make.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# Pylint doesn't play well with fixtures and dependency injection from pytest
-# pylint: disable=redefined-outer-name
-
-import os
-import pytest
-
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
-from buildstream.testing._utils.site import HAVE_SANDBOX
-
-
-pytestmark = pytest.mark.integration
-
-
-DATA_DIR = os.path.join(
-    os.path.dirname(os.path.realpath(__file__)),
-    "project"
-)
-
-
-# Test that a make build 'works' - we use the make sample
-# makehello project for this.
-@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_make_build(cli, datafiles):
-    project = str(datafiles)
-    checkout = os.path.join(cli.directory, 'checkout')
-    element_name = 'make/makehello.bst'
-
-    result = cli.run(project=project, args=['build', element_name])
-    assert result.exit_code == 0
-
-    result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
-    assert result.exit_code == 0
-
-    assert_contains(checkout, ['/usr', '/usr/bin',
-                               '/usr/bin/hello'])
-
-
-# Test running an executable built with make
-@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_make_run(cli, datafiles):
-    project = str(datafiles)
-    element_name = 'make/makehello.bst'
-
-    result = cli.run(project=project, args=['build', element_name])
-    assert result.exit_code == 0
-
-    result = cli.run(project=project, args=['shell', element_name, '/usr/bin/hello'])
-    assert result.exit_code == 0
-    assert result.output == 'Hello, world\n'
diff --git a/tests/integration/project/elements/cmake/cmakeconfroothello.bst b/tests/integration/project/elements/cmake/cmakeconfroothello.bst
deleted file mode 100644
index cd33dee..0000000
--- a/tests/integration/project/elements/cmake/cmakeconfroothello.bst
+++ /dev/null
@@ -1,15 +0,0 @@
-kind: cmake
-description: Cmake test
-
-depends:
-  - base.bst
-
-sources:
-  - kind: tar
-    directory: Source
-    url: project_dir:/files/cmakehello.tar.gz
-    ref: 508266f40dbc5875293bd24c4e50a9eb6b88cbacab742033f7b92f8c087b64e5
-
-variables:
-  conf-root: "%{build-root}/Source"
-  command-subdir: build
diff --git a/tests/integration/project/elements/cmake/cmakehello.bst b/tests/integration/project/elements/cmake/cmakehello.bst
deleted file mode 100644
index c5fe496..0000000
--- a/tests/integration/project/elements/cmake/cmakehello.bst
+++ /dev/null
@@ -1,10 +0,0 @@
-kind: cmake
-description: Cmake test
-
-depends:
-  - base.bst
-
-sources:
-  - kind: tar
-    url: project_dir:/files/cmakehello.tar.gz
-    ref: 508266f40dbc5875293bd24c4e50a9eb6b88cbacab742033f7b92f8c087b64e5
diff --git a/tests/integration/project/elements/make/makehello.bst b/tests/integration/project/elements/make/makehello.bst
deleted file mode 100644
index 4b5c5ac..0000000
--- a/tests/integration/project/elements/make/makehello.bst
+++ /dev/null
@@ -1,10 +0,0 @@
-kind: make
-description: make test
-
-depends:
-- base.bst
-
-sources:
-- kind: tar
-  url: project_dir:/files/makehello.tar.gz
-  ref: fd342a36503a0a0dd37b81ddb4d2b78bd398d912d813339e0de44a6b6c393b8e
diff --git a/tests/integration/project/files/cmakehello.tar.gz b/tests/integration/project/files/cmakehello.tar.gz
deleted file mode 100644
index 54d9505..0000000
Binary files a/tests/integration/project/files/cmakehello.tar.gz and /dev/null differ
diff --git a/tests/integration/project/files/makehello.tar.gz b/tests/integration/project/files/makehello.tar.gz
deleted file mode 100644
index d0edcb2..0000000
Binary files a/tests/integration/project/files/makehello.tar.gz and /dev/null differ