Benjamin Schubert pushed to branch bschubert/add-fedora-nobwrap-tests at BuildStream / buildstream
Commits:
-
2e82b54d
by Benjamin Schubert at 2018-11-12T10:29:18Z
4 changed files:
- tests/integration/build-uid.py
- tests/integration/cachedfail.py
- tests/integration/cmake.py
- tests/integration/compose.py
Changes:
... | ... | @@ -5,7 +5,7 @@ from buildstream import _yaml |
5 | 5 |
|
6 | 6 |
from tests.testutils import cli_integration as cli
|
7 | 7 |
from tests.testutils.integration import assert_contains
|
8 |
-from tests.testutils.site import IS_LINUX
|
|
8 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
9 | 9 |
|
10 | 10 |
|
11 | 11 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -16,7 +16,7 @@ DATA_DIR = os.path.join( |
16 | 16 |
)
|
17 | 17 |
|
18 | 18 |
|
19 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
19 |
+@pytest.mark.skipif(not IS_LINUX and not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
20 | 20 |
@pytest.mark.datafiles(DATA_DIR)
|
21 | 21 |
def test_build_uid_overridden(cli, tmpdir, datafiles):
|
22 | 22 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -35,7 +35,7 @@ def test_build_uid_overridden(cli, tmpdir, datafiles): |
35 | 35 |
assert result.exit_code == 0
|
36 | 36 |
|
37 | 37 |
|
38 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
38 |
+@pytest.mark.skipif(not IS_LINUX and not HAVE_BWRAP, reason='Only available on linux with bubbelwrap')
|
|
39 | 39 |
@pytest.mark.datafiles(DATA_DIR)
|
40 | 40 |
def test_build_uid_in_project(cli, tmpdir, datafiles):
|
41 | 41 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -55,6 +55,7 @@ def test_build_uid_in_project(cli, tmpdir, datafiles): |
55 | 55 |
|
56 | 56 |
|
57 | 57 |
@pytest.mark.datafiles(DATA_DIR)
|
58 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
58 | 59 |
def test_build_uid_default(cli, tmpdir, datafiles):
|
59 | 60 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
60 | 61 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -5,7 +5,7 @@ from buildstream import _yaml |
5 | 5 |
from buildstream._exceptions import ErrorDomain
|
6 | 6 |
|
7 | 7 |
from tests.testutils import cli_integration as cli, create_artifact_share
|
8 |
-from tests.testutils.site import IS_LINUX
|
|
8 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
9 | 9 |
|
10 | 10 |
|
11 | 11 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -18,6 +18,7 @@ DATA_DIR = os.path.join( |
18 | 18 |
|
19 | 19 |
|
20 | 20 |
@pytest.mark.datafiles(DATA_DIR)
|
21 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
21 | 22 |
def test_build_checkout_cached_fail(cli, tmpdir, datafiles):
|
22 | 23 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
23 | 24 |
element_path = os.path.join(project, 'elements', 'element.bst')
|
... | ... | @@ -3,6 +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 HAVE_BWRAP, IS_LINUX
|
|
6 | 7 |
|
7 | 8 |
|
8 | 9 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -15,6 +16,7 @@ DATA_DIR = os.path.join( |
15 | 16 |
|
16 | 17 |
|
17 | 18 |
@pytest.mark.datafiles(DATA_DIR)
|
19 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
18 | 20 |
def test_cmake_build(cli, tmpdir, datafiles):
|
19 | 21 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
20 | 22 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -33,6 +35,7 @@ def test_cmake_build(cli, tmpdir, datafiles): |
33 | 35 |
|
34 | 36 |
|
35 | 37 |
@pytest.mark.datafiles(DATA_DIR)
|
38 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
36 | 39 |
def test_cmake_confroot_build(cli, tmpdir, datafiles):
|
37 | 40 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
38 | 41 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -51,6 +54,7 @@ def test_cmake_confroot_build(cli, tmpdir, datafiles): |
51 | 54 |
|
52 | 55 |
|
53 | 56 |
@pytest.mark.datafiles(DATA_DIR)
|
57 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
54 | 58 |
def test_cmake_run(cli, tmpdir, datafiles):
|
55 | 59 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
56 | 60 |
element_name = 'cmake/cmakehello.bst'
|
... | ... | @@ -7,6 +7,7 @@ from buildstream import _yaml |
7 | 7 |
|
8 | 8 |
from tests.testutils import cli_integration as cli
|
9 | 9 |
from tests.testutils.integration import walk_dir
|
10 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
10 | 11 |
|
11 | 12 |
|
12 | 13 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -82,6 +83,7 @@ def create_compose_element(name, path, config={}): |
82 | 83 |
'/usr/share/doc', '/usr/share/doc/amhello',
|
83 | 84 |
'/usr/share/doc/amhello/README'])
|
84 | 85 |
])
|
86 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
85 | 87 |
def test_compose_include(cli, tmpdir, datafiles, include_domains,
|
86 | 88 |
exclude_domains, expected):
|
87 | 89 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|