Loading .gitlab-ci.yml +18 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,24 @@ tests-unix: - python3 setup.py test --index-url invalid://uri --addopts --integration tests-fedora-missing-deps: # Ensure that tests behave nicely while missing bwrap and ostree image: buildstream/testsuite-fedora:28-master-119-552f5fc6 <<: *tests script: # We remove the Bubblewrap and OSTree packages here so that we catch any # codepaths that try to use them. Removing OSTree causes fuse-libs to # disappear unless we mark it as user-installed. - dnf mark install fuse-libs - dnf erase -y bubblewrap ostree - useradd -Um buildstream - chown -R buildstream:buildstream . - python3 setup.py test --index-url invalid://uri --addopts --integration # Automatically build documentation for every commit, we want to know # if building documentation fails even if we're not deploying it. # Note: We still do not enforce a consistent installation of python3-sphinx, Loading tests/examples/autotools.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains from tests.testutils.site import IS_LINUX, MACHINE_ARCH from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH pytestmark = pytest.mark.integration Loading @@ -15,7 +15,7 @@ DATA_DIR = os.path.join( # Tests a build of the autotools amhello project on a alpine-linux base runtime @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_autotools_build(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading @@ -40,7 +40,7 @@ def test_autotools_build(cli, tmpdir, datafiles): # Test running an executable built with autotools. @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_autotools_run(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading tests/examples/developing.py +4 −4 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import pytest import tests.testutils.patch as patch from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains from tests.testutils.site import IS_LINUX, MACHINE_ARCH from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH pytestmark = pytest.mark.integration Loading @@ -16,7 +16,7 @@ DATA_DIR = os.path.join( # Test that the project builds successfully @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_autotools_build(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading @@ -39,7 +39,7 @@ def test_autotools_build(cli, tmpdir, datafiles): # Test the unmodified hello command works as expected. @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_run_unmodified_hello(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading Loading @@ -72,7 +72,7 @@ def test_open_workspace(cli, tmpdir, datafiles): # Test making a change using the workspace @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_make_change_in_workspace(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading tests/examples/flatpak-autotools.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains from tests.testutils.site import IS_LINUX, MACHINE_ARCH from tests.testutils.site import HAVE_OSTREE, IS_LINUX, MACHINE_ARCH pytestmark = pytest.mark.integration Loading Loading @@ -34,7 +34,7 @@ def workaround_setuptools_bug(project): # amhello project for this. @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree') @pytest.mark.datafiles(DATA_DIR) def test_autotools_build(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading @@ -59,7 +59,7 @@ def test_autotools_build(cli, tmpdir, datafiles): # Test running an executable built with autotools @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree') @pytest.mark.datafiles(DATA_DIR) def test_autotools_run(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading tests/examples/integration-commands.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains from tests.testutils.site import IS_LINUX, MACHINE_ARCH from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH pytestmark = pytest.mark.integration Loading @@ -14,7 +14,7 @@ DATA_DIR = os.path.join( @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_integration_commands_build(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading @@ -27,7 +27,7 @@ def test_integration_commands_build(cli, tmpdir, datafiles): # Test running the executable @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_integration_commands_run(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading Loading
.gitlab-ci.yml +18 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,24 @@ tests-unix: - python3 setup.py test --index-url invalid://uri --addopts --integration tests-fedora-missing-deps: # Ensure that tests behave nicely while missing bwrap and ostree image: buildstream/testsuite-fedora:28-master-119-552f5fc6 <<: *tests script: # We remove the Bubblewrap and OSTree packages here so that we catch any # codepaths that try to use them. Removing OSTree causes fuse-libs to # disappear unless we mark it as user-installed. - dnf mark install fuse-libs - dnf erase -y bubblewrap ostree - useradd -Um buildstream - chown -R buildstream:buildstream . - python3 setup.py test --index-url invalid://uri --addopts --integration # Automatically build documentation for every commit, we want to know # if building documentation fails even if we're not deploying it. # Note: We still do not enforce a consistent installation of python3-sphinx, Loading
tests/examples/autotools.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains from tests.testutils.site import IS_LINUX, MACHINE_ARCH from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH pytestmark = pytest.mark.integration Loading @@ -15,7 +15,7 @@ DATA_DIR = os.path.join( # Tests a build of the autotools amhello project on a alpine-linux base runtime @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_autotools_build(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading @@ -40,7 +40,7 @@ def test_autotools_build(cli, tmpdir, datafiles): # Test running an executable built with autotools. @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_autotools_run(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading
tests/examples/developing.py +4 −4 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import pytest import tests.testutils.patch as patch from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains from tests.testutils.site import IS_LINUX, MACHINE_ARCH from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH pytestmark = pytest.mark.integration Loading @@ -16,7 +16,7 @@ DATA_DIR = os.path.join( # Test that the project builds successfully @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_autotools_build(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading @@ -39,7 +39,7 @@ def test_autotools_build(cli, tmpdir, datafiles): # Test the unmodified hello command works as expected. @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_run_unmodified_hello(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading Loading @@ -72,7 +72,7 @@ def test_open_workspace(cli, tmpdir, datafiles): # Test making a change using the workspace @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_make_change_in_workspace(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading
tests/examples/flatpak-autotools.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains from tests.testutils.site import IS_LINUX, MACHINE_ARCH from tests.testutils.site import HAVE_OSTREE, IS_LINUX, MACHINE_ARCH pytestmark = pytest.mark.integration Loading Loading @@ -34,7 +34,7 @@ def workaround_setuptools_bug(project): # amhello project for this. @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree') @pytest.mark.datafiles(DATA_DIR) def test_autotools_build(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading @@ -59,7 +59,7 @@ def test_autotools_build(cli, tmpdir, datafiles): # Test running an executable built with autotools @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree') @pytest.mark.datafiles(DATA_DIR) def test_autotools_run(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading
tests/examples/integration-commands.py +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains from tests.testutils.site import IS_LINUX, MACHINE_ARCH from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH pytestmark = pytest.mark.integration Loading @@ -14,7 +14,7 @@ DATA_DIR = os.path.join( @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_integration_commands_build(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading @@ -27,7 +27,7 @@ def test_integration_commands_build(cli, tmpdir, datafiles): # Test running the executable @pytest.mark.skipif(MACHINE_ARCH != 'x86_64', reason='Examples are writtent for x86_64') @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_integration_commands_run(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) Loading