diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2018-11-20 17:35:17 +0000 |
---|---|---|
committer | Benjamin Schubert <ben.c.schubert@gmail.com> | 2018-11-20 18:10:48 +0000 |
commit | 57e6358fef757f9c9d3ff202442450dcb1d1ac32 (patch) | |
tree | 43458322429552e93c48131b74ca57ffff97d314 /tests/examples | |
parent | e030b48e84f84ae14c004bf830292e13a65a817f (diff) | |
download | buildstream-57e6358fef757f9c9d3ff202442450dcb1d1ac32.tar.gz |
Ensure tests requiring bubblewrap are correctly marked
Diffstat (limited to 'tests/examples')
-rw-r--r-- | tests/examples/autotools.py | 6 | ||||
-rw-r--r-- | tests/examples/developing.py | 8 | ||||
-rw-r--r-- | tests/examples/flatpak-autotools.py | 6 | ||||
-rw-r--r-- | tests/examples/integration-commands.py | 6 | ||||
-rw-r--r-- | tests/examples/junctions.py | 6 | ||||
-rw-r--r-- | tests/examples/running-commands.py | 6 |
6 files changed, 19 insertions, 19 deletions
diff --git a/tests/examples/autotools.py b/tests/examples/autotools.py index fc6ff7e09..e7ca8c5e9 100644 --- a/tests/examples/autotools.py +++ b/tests/examples/autotools.py @@ -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 @@ -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) @@ -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) diff --git a/tests/examples/developing.py b/tests/examples/developing.py index 6c65c5e54..59bcdcd47 100644 --- a/tests/examples/developing.py +++ b/tests/examples/developing.py @@ -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 @@ -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) @@ -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) @@ -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) diff --git a/tests/examples/flatpak-autotools.py b/tests/examples/flatpak-autotools.py index 32a0dc193..dbaf522a2 100644 --- a/tests/examples/flatpak-autotools.py +++ b/tests/examples/flatpak-autotools.py @@ -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 @@ -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) @@ -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) diff --git a/tests/examples/integration-commands.py b/tests/examples/integration-commands.py index 19c5df2ef..f4b0405e0 100644 --- a/tests/examples/integration-commands.py +++ b/tests/examples/integration-commands.py @@ -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 @@ -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) @@ -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) diff --git a/tests/examples/junctions.py b/tests/examples/junctions.py index 9ddb7b7fb..022569c52 100644 --- a/tests/examples/junctions.py +++ b/tests/examples/junctions.py @@ -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 IS_LINUX, HAVE_BWRAP, MACHINE_ARCH pytestmark = pytest.mark.integration @@ -15,7 +15,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_build(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) @@ -27,7 +27,7 @@ def test_build(cli, tmpdir, datafiles): # Test the callHello script 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_shell_call_hello(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) diff --git a/tests/examples/running-commands.py b/tests/examples/running-commands.py index 26b53f7ad..3e679f9c2 100644 --- a/tests/examples/running-commands.py +++ b/tests/examples/running-commands.py @@ -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 IS_LINUX, HAVE_BWRAP, MACHINE_ARCH pytestmark = pytest.mark.integration @@ -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_running_commands_build(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) @@ -27,7 +27,7 @@ def test_running_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_running_commands_run(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) |