Benjamin Schubert pushed to branch bschubert/add-fedora-nobwrap-tests at BuildStream / buildstream
Commits:
-
3ffdff30
by Benjamin Schubert at 2018-11-12T11:40:03Z
4 changed files:
- tests/examples/autotools.py
- tests/examples/developing.py
- tests/examples/flatpak-autotools.py
- tests/examples/integration-commands.py
Changes:
... | ... | @@ -3,7 +3,7 @@ import pytest |
3 | 3 |
|
4 | 4 |
from tests.testutils import cli_integration as cli
|
5 | 5 |
from tests.testutils.integration import assert_contains
|
6 |
-from tests.testutils.site import IS_LINUX
|
|
6 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
7 | 7 |
|
8 | 8 |
pytestmark = pytest.mark.integration
|
9 | 9 |
|
... | ... | @@ -13,7 +13,7 @@ DATA_DIR = os.path.join( |
13 | 13 |
|
14 | 14 |
|
15 | 15 |
# Tests a build of the autotools amhello project on a alpine-linux base runtime
|
16 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
16 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
17 | 17 |
@pytest.mark.datafiles(DATA_DIR)
|
18 | 18 |
def test_autotools_build(cli, tmpdir, datafiles):
|
19 | 19 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -36,7 +36,7 @@ def test_autotools_build(cli, tmpdir, datafiles): |
36 | 36 |
|
37 | 37 |
|
38 | 38 |
# Test running an executable built with autotools.
|
39 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
39 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
40 | 40 |
@pytest.mark.datafiles(DATA_DIR)
|
41 | 41 |
def test_autotools_run(cli, tmpdir, datafiles):
|
42 | 42 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -4,7 +4,7 @@ import pytest |
4 | 4 |
import tests.testutils.patch as patch
|
5 | 5 |
from tests.testutils import cli_integration as cli
|
6 | 6 |
from tests.testutils.integration import assert_contains
|
7 |
-from tests.testutils.site import IS_LINUX
|
|
7 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
8 | 8 |
|
9 | 9 |
pytestmark = pytest.mark.integration
|
10 | 10 |
|
... | ... | @@ -14,7 +14,7 @@ DATA_DIR = os.path.join( |
14 | 14 |
|
15 | 15 |
|
16 | 16 |
# Test that the project builds successfully
|
17 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
17 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
18 | 18 |
@pytest.mark.datafiles(DATA_DIR)
|
19 | 19 |
def test_autotools_build(cli, tmpdir, datafiles):
|
20 | 20 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -35,7 +35,7 @@ def test_autotools_build(cli, tmpdir, datafiles): |
35 | 35 |
|
36 | 36 |
|
37 | 37 |
# Test the unmodified hello command works as expected.
|
38 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
38 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
39 | 39 |
@pytest.mark.datafiles(DATA_DIR)
|
40 | 40 |
def test_run_unmodified_hello(cli, tmpdir, datafiles):
|
41 | 41 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -66,7 +66,7 @@ def test_open_workspace(cli, tmpdir, datafiles): |
66 | 66 |
|
67 | 67 |
|
68 | 68 |
# Test making a change using the workspace
|
69 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
69 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
70 | 70 |
@pytest.mark.datafiles(DATA_DIR)
|
71 | 71 |
def test_make_change_in_workspace(cli, tmpdir, datafiles):
|
72 | 72 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -3,7 +3,7 @@ import pytest |
3 | 3 |
|
4 | 4 |
from tests.testutils import cli_integration as cli
|
5 | 5 |
from tests.testutils.integration import assert_contains
|
6 |
-from tests.testutils.site import IS_LINUX
|
|
6 |
+from tests.testutils.site import HAVE_OSTREE, IS_LINUX
|
|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -32,7 +32,7 @@ def workaround_setuptools_bug(project): |
32 | 32 |
|
33 | 33 |
# Test that a build upon flatpak runtime 'works' - we use the autotools sample
|
34 | 34 |
# amhello project for this.
|
35 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
35 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree')
|
|
36 | 36 |
@pytest.mark.datafiles(DATA_DIR)
|
37 | 37 |
def test_autotools_build(cli, tmpdir, datafiles):
|
38 | 38 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -55,7 +55,7 @@ def test_autotools_build(cli, tmpdir, datafiles): |
55 | 55 |
|
56 | 56 |
|
57 | 57 |
# Test running an executable built with autotools
|
58 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
58 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree')
|
|
59 | 59 |
@pytest.mark.datafiles(DATA_DIR)
|
60 | 60 |
def test_autotools_run(cli, tmpdir, datafiles):
|
61 | 61 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -23,7 +23,7 @@ def test_integration_commands_build(cli, tmpdir, datafiles): |
23 | 23 |
|
24 | 24 |
|
25 | 25 |
# Test running the executable
|
26 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
26 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
27 | 27 |
@pytest.mark.datafiles(DATA_DIR)
|
28 | 28 |
def test_integration_commands_run(cli, tmpdir, datafiles):
|
29 | 29 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|