Benjamin Schubert pushed to branch bschubert/add-fedora-nobwrap-tests at BuildStream / buildstream
Commits:
-
6a83d08e
by Benjamin Schubert at 2018-11-19T18:32:20Z
-
b6d344a9
by Benjamin Schubert at 2018-11-19T18:32:20Z
25 changed files:
- .gitlab-ci.yml
- tests/examples/autotools.py
- tests/examples/developing.py
- tests/examples/flatpak-autotools.py
- tests/examples/integration-commands.py
- tests/examples/junctions.py
- tests/examples/running-commands.py
- tests/integration/autotools.py
- tests/integration/build-tree.py
- tests/integration/build-uid.py
- tests/integration/cachedfail.py
- tests/integration/cmake.py
- tests/integration/compose.py
- tests/integration/make.py
- tests/integration/manual.py
- tests/integration/pip_element.py
- tests/integration/pip_source.py
- tests/integration/pullbuildtrees.py
- tests/integration/script.py
- tests/integration/shell.py
- tests/integration/sockets.py
- tests/integration/source-determinism.py
- tests/integration/stack.py
- tests/integration/symlinks.py
- tests/integration/workspace.py
Changes:
... | ... | @@ -13,6 +13,7 @@ stages: |
13 | 13 |
variables:
|
14 | 14 |
PYTEST_ADDOPTS: "--color=yes"
|
15 | 15 |
INTEGRATION_CACHE: "${CI_PROJECT_DIR}/cache/integration-cache"
|
16 |
+ TEST_COMMAND: 'python3 setup.py test --index-url invalid://uri --addopts --integration'
|
|
16 | 17 |
|
17 | 18 |
#####################################################
|
18 | 19 |
# Prepare stage #
|
... | ... | @@ -77,7 +78,7 @@ source_dist: |
77 | 78 |
|
78 | 79 |
# Run the tests from the source distribution, We run as a simple
|
79 | 80 |
# user to test for permission issues
|
80 |
- - su buildstream -c 'python3 setup.py test --index-url invalid://uri --addopts --integration'
|
|
81 |
+ - su buildstream -c "${TEST_COMMAND}"
|
|
81 | 82 |
|
82 | 83 |
after_script:
|
83 | 84 |
# Collect our reports
|
... | ... | @@ -134,7 +135,25 @@ tests-unix: |
134 | 135 |
- dnf erase -y bubblewrap ostree
|
135 | 136 |
|
136 | 137 |
# Since the unix platform is required to run as root, no user change required
|
137 |
- - python3 setup.py test --index-url invalid://uri --addopts --integration
|
|
138 |
+ - ${TEST_COMMAND}
|
|
139 |
+ |
|
140 |
+ |
|
141 |
+tests-fedora-missing-deps:
|
|
142 |
+ # Ensure that tests behave nicely while missing bwrap and ostree
|
|
143 |
+ image: buildstream/testsuite-fedora:28-master-119-552f5fc6
|
|
144 |
+ <<: *tests
|
|
145 |
+ |
|
146 |
+ script:
|
|
147 |
+ # We remove the Bubblewrap and OSTree packages here so that we catch any
|
|
148 |
+ # codepaths that try to use them. Removing OSTree causes fuse-libs to
|
|
149 |
+ # disappear unless we mark it as user-installed.
|
|
150 |
+ - dnf mark install fuse-libs
|
|
151 |
+ - dnf erase -y bubblewrap ostree
|
|
152 |
+ |
|
153 |
+ - useradd -Um buildstream
|
|
154 |
+ - chown -R buildstream:buildstream .
|
|
155 |
+ |
|
156 |
+ - ${TEST_COMMAND}
|
|
138 | 157 |
|
139 | 158 |
|
140 | 159 |
# Automatically build documentation for every commit, we want to know
|
... | ... | @@ -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, MACHINE_ARCH
|
|
6 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH
|
|
7 | 7 |
|
8 | 8 |
pytestmark = pytest.mark.integration
|
9 | 9 |
|
... | ... | @@ -15,7 +15,7 @@ DATA_DIR = os.path.join( |
15 | 15 |
# Tests a build of the autotools amhello project on a alpine-linux base runtime
|
16 | 16 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
17 | 17 |
reason='Examples are writtent for x86_64')
|
18 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
18 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
19 | 19 |
@pytest.mark.datafiles(DATA_DIR)
|
20 | 20 |
def test_autotools_build(cli, tmpdir, datafiles):
|
21 | 21 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -40,7 +40,7 @@ def test_autotools_build(cli, tmpdir, datafiles): |
40 | 40 |
# Test running an executable built with autotools.
|
41 | 41 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
42 | 42 |
reason='Examples are writtent for x86_64')
|
43 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
43 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
44 | 44 |
@pytest.mark.datafiles(DATA_DIR)
|
45 | 45 |
def test_autotools_run(cli, tmpdir, datafiles):
|
46 | 46 |
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, MACHINE_ARCH
|
|
7 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH
|
|
8 | 8 |
|
9 | 9 |
pytestmark = pytest.mark.integration
|
10 | 10 |
|
... | ... | @@ -16,7 +16,7 @@ DATA_DIR = os.path.join( |
16 | 16 |
# Test that the project builds successfully
|
17 | 17 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
18 | 18 |
reason='Examples are writtent for x86_64')
|
19 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
19 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
20 | 20 |
@pytest.mark.datafiles(DATA_DIR)
|
21 | 21 |
def test_autotools_build(cli, tmpdir, datafiles):
|
22 | 22 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -39,7 +39,7 @@ def test_autotools_build(cli, tmpdir, datafiles): |
39 | 39 |
# Test the unmodified hello command works as expected.
|
40 | 40 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
41 | 41 |
reason='Examples are writtent for x86_64')
|
42 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
42 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
43 | 43 |
@pytest.mark.datafiles(DATA_DIR)
|
44 | 44 |
def test_run_unmodified_hello(cli, tmpdir, datafiles):
|
45 | 45 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -72,7 +72,7 @@ def test_open_workspace(cli, tmpdir, datafiles): |
72 | 72 |
# Test making a change using the workspace
|
73 | 73 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
74 | 74 |
reason='Examples are writtent for x86_64')
|
75 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
75 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
76 | 76 |
@pytest.mark.datafiles(DATA_DIR)
|
77 | 77 |
def test_make_change_in_workspace(cli, tmpdir, datafiles):
|
78 | 78 |
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, MACHINE_ARCH
|
|
6 |
+from tests.testutils.site import HAVE_OSTREE, IS_LINUX, MACHINE_ARCH
|
|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -34,7 +34,7 @@ def workaround_setuptools_bug(project): |
34 | 34 |
# amhello project for this.
|
35 | 35 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
36 | 36 |
reason='Examples are writtent for x86_64')
|
37 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
37 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree')
|
|
38 | 38 |
@pytest.mark.datafiles(DATA_DIR)
|
39 | 39 |
def test_autotools_build(cli, tmpdir, datafiles):
|
40 | 40 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -59,7 +59,7 @@ def test_autotools_build(cli, tmpdir, datafiles): |
59 | 59 |
# Test running an executable built with autotools
|
60 | 60 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
61 | 61 |
reason='Examples are writtent for x86_64')
|
62 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
62 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree')
|
|
63 | 63 |
@pytest.mark.datafiles(DATA_DIR)
|
64 | 64 |
def test_autotools_run(cli, tmpdir, datafiles):
|
65 | 65 |
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, MACHINE_ARCH
|
|
6 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH
|
|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -14,7 +14,7 @@ DATA_DIR = os.path.join( |
14 | 14 |
|
15 | 15 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
16 | 16 |
reason='Examples are writtent for x86_64')
|
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_integration_commands_build(cli, tmpdir, datafiles):
|
20 | 20 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -27,7 +27,7 @@ def test_integration_commands_build(cli, tmpdir, datafiles): |
27 | 27 |
# Test running the executable
|
28 | 28 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
29 | 29 |
reason='Examples are writtent for x86_64')
|
30 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
30 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
31 | 31 |
@pytest.mark.datafiles(DATA_DIR)
|
32 | 32 |
def test_integration_commands_run(cli, tmpdir, datafiles):
|
33 | 33 |
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, MACHINE_ARCH
|
|
6 |
+from tests.testutils.site import IS_LINUX, HAVE_BWRAP, MACHINE_ARCH
|
|
7 | 7 |
|
8 | 8 |
pytestmark = pytest.mark.integration
|
9 | 9 |
|
... | ... | @@ -15,7 +15,7 @@ DATA_DIR = os.path.join( |
15 | 15 |
# Test that the project builds successfully
|
16 | 16 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
17 | 17 |
reason='Examples are writtent for x86_64')
|
18 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
18 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
19 | 19 |
@pytest.mark.datafiles(DATA_DIR)
|
20 | 20 |
def test_build(cli, tmpdir, datafiles):
|
21 | 21 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -27,7 +27,7 @@ def test_build(cli, tmpdir, datafiles): |
27 | 27 |
# Test the callHello script works as expected.
|
28 | 28 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
29 | 29 |
reason='Examples are writtent for x86_64')
|
30 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
30 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
31 | 31 |
@pytest.mark.datafiles(DATA_DIR)
|
32 | 32 |
def test_shell_call_hello(cli, tmpdir, datafiles):
|
33 | 33 |
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, MACHINE_ARCH
|
|
6 |
+from tests.testutils.site import IS_LINUX, HAVE_BWRAP, MACHINE_ARCH
|
|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -14,7 +14,7 @@ DATA_DIR = os.path.join( |
14 | 14 |
|
15 | 15 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
16 | 16 |
reason='Examples are writtent for x86_64')
|
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_running_commands_build(cli, tmpdir, datafiles):
|
20 | 20 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -27,7 +27,7 @@ def test_running_commands_build(cli, tmpdir, datafiles): |
27 | 27 |
# Test running the executable
|
28 | 28 |
@pytest.mark.skipif(MACHINE_ARCH != 'x86_64',
|
29 | 29 |
reason='Examples are writtent for x86_64')
|
30 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
30 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
31 | 31 |
@pytest.mark.datafiles(DATA_DIR)
|
32 | 32 |
def test_running_commands_run(cli, tmpdir, datafiles):
|
33 | 33 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -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
|
... | ... | @@ -18,6 +19,7 @@ DATA_DIR = os.path.join( |
18 | 19 |
# amhello project for this.
|
19 | 20 |
@pytest.mark.integration
|
20 | 21 |
@pytest.mark.datafiles(DATA_DIR)
|
22 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
21 | 23 |
def test_autotools_build(cli, tmpdir, datafiles):
|
22 | 24 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
23 | 25 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -42,6 +44,7 @@ def test_autotools_build(cli, tmpdir, datafiles): |
42 | 44 |
# amhello project for this.
|
43 | 45 |
@pytest.mark.integration
|
44 | 46 |
@pytest.mark.datafiles(DATA_DIR)
|
47 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
45 | 48 |
def test_autotools_confroot_build(cli, tmpdir, datafiles):
|
46 | 49 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
47 | 50 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -64,6 +67,7 @@ def test_autotools_confroot_build(cli, tmpdir, datafiles): |
64 | 67 |
|
65 | 68 |
# Test running an executable built with autotools
|
66 | 69 |
@pytest.mark.datafiles(DATA_DIR)
|
70 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
67 | 71 |
def test_autotools_run(cli, tmpdir, datafiles):
|
68 | 72 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
69 | 73 |
element_name = 'autotools/amhello.bst'
|
... | ... | @@ -3,6 +3,7 @@ import pytest |
3 | 3 |
import shutil
|
4 | 4 |
|
5 | 5 |
from tests.testutils import cli, cli_integration, create_artifact_share
|
6 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
6 | 7 |
from buildstream._exceptions import ErrorDomain
|
7 | 8 |
|
8 | 9 |
|
... | ... | @@ -16,6 +17,7 @@ DATA_DIR = os.path.join( |
16 | 17 |
|
17 | 18 |
|
18 | 19 |
@pytest.mark.datafiles(DATA_DIR)
|
20 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
19 | 21 |
def test_buildtree_staged(cli_integration, tmpdir, datafiles):
|
20 | 22 |
# i.e. tests that cached build trees are staged by `bst shell --build`
|
21 | 23 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -31,6 +33,7 @@ def test_buildtree_staged(cli_integration, tmpdir, datafiles): |
31 | 33 |
|
32 | 34 |
|
33 | 35 |
@pytest.mark.datafiles(DATA_DIR)
|
36 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
34 | 37 |
def test_buildtree_from_failure(cli_integration, tmpdir, datafiles):
|
35 | 38 |
# i.e. test that on a build failure, we can still shell into it
|
36 | 39 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -50,6 +53,7 @@ def test_buildtree_from_failure(cli_integration, tmpdir, datafiles): |
50 | 53 |
# Check that build shells work when pulled from a remote cache
|
51 | 54 |
# This is to roughly simulate remote execution
|
52 | 55 |
@pytest.mark.datafiles(DATA_DIR)
|
56 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
53 | 57 |
def test_buildtree_pulled(cli, tmpdir, datafiles):
|
54 | 58 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
55 | 59 |
element_name = 'build-shell/buildtree.bst'
|
... | ... | @@ -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 or 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 or 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')
|
... | ... | @@ -7,7 +7,7 @@ from buildstream._exceptions import ErrorDomain |
7 | 7 |
from conftest import clean_platform_cache
|
8 | 8 |
|
9 | 9 |
from tests.testutils import cli_integration as cli, create_artifact_share
|
10 |
-from tests.testutils.site import IS_LINUX
|
|
10 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
11 | 11 |
|
12 | 12 |
|
13 | 13 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -20,6 +20,7 @@ DATA_DIR = os.path.join( |
20 | 20 |
|
21 | 21 |
|
22 | 22 |
@pytest.mark.datafiles(DATA_DIR)
|
23 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
23 | 24 |
def test_build_checkout_cached_fail(cli, tmpdir, datafiles):
|
24 | 25 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
25 | 26 |
element_path = os.path.join(project, 'elements', 'element.bst')
|
... | ... | @@ -63,6 +64,7 @@ def test_build_checkout_cached_fail(cli, tmpdir, datafiles): |
63 | 64 |
|
64 | 65 |
|
65 | 66 |
@pytest.mark.datafiles(DATA_DIR)
|
67 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
66 | 68 |
def test_build_depend_on_cached_fail(cli, tmpdir, datafiles):
|
67 | 69 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
68 | 70 |
dep_path = os.path.join(project, 'elements', 'dep.bst')
|
... | ... | @@ -121,7 +123,7 @@ def test_build_depend_on_cached_fail(cli, tmpdir, datafiles): |
121 | 123 |
assert cli.get_element_state(project, 'target.bst') == 'waiting'
|
122 | 124 |
|
123 | 125 |
|
124 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
126 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
125 | 127 |
@pytest.mark.datafiles(DATA_DIR)
|
126 | 128 |
@pytest.mark.parametrize("on_error", ("continue", "quit"))
|
127 | 129 |
def test_push_cached_fail(cli, tmpdir, datafiles, on_error):
|
... | ... | @@ -162,7 +164,7 @@ def test_push_cached_fail(cli, tmpdir, datafiles, on_error): |
162 | 164 |
assert share.has_artifact('test', 'element.bst', cli.get_element_key(project, 'element.bst'))
|
163 | 165 |
|
164 | 166 |
|
165 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
167 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
166 | 168 |
@pytest.mark.datafiles(DATA_DIR)
|
167 | 169 |
def test_host_tools_errors_are_not_cached(cli, tmpdir, datafiles):
|
168 | 170 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -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)
|
... | ... | @@ -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
|
... | ... | @@ -18,6 +19,7 @@ DATA_DIR = os.path.join( |
18 | 19 |
# makehello project for this.
|
19 | 20 |
@pytest.mark.integration
|
20 | 21 |
@pytest.mark.datafiles(DATA_DIR)
|
22 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
21 | 23 |
def test_make_build(cli, tmpdir, datafiles):
|
22 | 24 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
23 | 25 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -35,6 +37,7 @@ def test_make_build(cli, tmpdir, datafiles): |
35 | 37 |
|
36 | 38 |
# Test running an executable built with make
|
37 | 39 |
@pytest.mark.datafiles(DATA_DIR)
|
40 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
38 | 41 |
def test_make_run(cli, tmpdir, datafiles):
|
39 | 42 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
40 | 43 |
element_name = 'make/makehello.bst'
|
... | ... | @@ -4,6 +4,7 @@ import pytest |
4 | 4 |
from buildstream import _yaml
|
5 | 5 |
|
6 | 6 |
from tests.testutils import cli_integration as cli
|
7 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
7 | 8 |
|
8 | 9 |
|
9 | 10 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -31,6 +32,7 @@ def create_manual_element(name, path, config, variables, environment): |
31 | 32 |
|
32 | 33 |
|
33 | 34 |
@pytest.mark.datafiles(DATA_DIR)
|
35 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
34 | 36 |
def test_manual_element(cli, tmpdir, datafiles):
|
35 | 37 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
36 | 38 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -64,6 +66,7 @@ strip |
64 | 66 |
|
65 | 67 |
|
66 | 68 |
@pytest.mark.datafiles(DATA_DIR)
|
69 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
67 | 70 |
def test_manual_element_environment(cli, tmpdir, datafiles):
|
68 | 71 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
69 | 72 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -93,6 +96,7 @@ def test_manual_element_environment(cli, tmpdir, datafiles): |
93 | 96 |
|
94 | 97 |
|
95 | 98 |
@pytest.mark.datafiles(DATA_DIR)
|
99 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
96 | 100 |
def test_manual_element_noparallel(cli, tmpdir, datafiles):
|
97 | 101 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
98 | 102 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -6,6 +6,7 @@ from buildstream import _yaml |
6 | 6 |
|
7 | 7 |
from tests.testutils import cli_integration as cli
|
8 | 8 |
from tests.testutils.integration import assert_contains
|
9 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
9 | 10 |
|
10 | 11 |
|
11 | 12 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -18,6 +19,7 @@ DATA_DIR = os.path.join( |
18 | 19 |
|
19 | 20 |
|
20 | 21 |
@pytest.mark.datafiles(DATA_DIR)
|
22 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
21 | 23 |
def test_pip_build(cli, tmpdir, datafiles):
|
22 | 24 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
23 | 25 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -54,6 +56,7 @@ def test_pip_build(cli, tmpdir, datafiles): |
54 | 56 |
|
55 | 57 |
# Test running an executable built with pip
|
56 | 58 |
@pytest.mark.datafiles(DATA_DIR)
|
59 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
57 | 60 |
def test_pip_run(cli, tmpdir, datafiles):
|
58 | 61 |
# Create and build our test element
|
59 | 62 |
test_pip_build(cli, tmpdir, datafiles)
|
... | ... | @@ -6,6 +6,7 @@ from buildstream import _yaml |
6 | 6 |
from tests.testutils import cli_integration as cli
|
7 | 7 |
from tests.testutils.python_repo import setup_pypi_repo
|
8 | 8 |
from tests.testutils.integration import assert_contains
|
9 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
9 | 10 |
|
10 | 11 |
|
11 | 12 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -72,6 +73,7 @@ def test_pip_source_import(cli, tmpdir, datafiles, setup_pypi_repo): |
72 | 73 |
|
73 | 74 |
|
74 | 75 |
@pytest.mark.datafiles(DATA_DIR)
|
76 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
75 | 77 |
def test_pip_source_build(cli, tmpdir, datafiles, setup_pypi_repo):
|
76 | 78 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
77 | 79 |
element_path = os.path.join(project, 'elements')
|
... | ... | @@ -4,6 +4,7 @@ import pytest |
4 | 4 |
|
5 | 5 |
from tests.testutils import cli_integration as cli, create_artifact_share
|
6 | 6 |
from tests.testutils.integration import assert_contains
|
7 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
7 | 8 |
from buildstream._exceptions import ErrorDomain, LoadErrorReason
|
8 | 9 |
|
9 | 10 |
|
... | ... | @@ -30,6 +31,7 @@ def default_state(cli, tmpdir, share): |
30 | 31 |
# directory of an element.
|
31 | 32 |
@pytest.mark.integration
|
32 | 33 |
@pytest.mark.datafiles(DATA_DIR)
|
34 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
33 | 35 |
def test_pullbuildtrees(cli, tmpdir, datafiles, integration_cache):
|
34 | 36 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
35 | 37 |
element_name = 'autotools/amhello.bst'
|
... | ... | @@ -4,6 +4,7 @@ import pytest |
4 | 4 |
from buildstream import _yaml
|
5 | 5 |
|
6 | 6 |
from tests.testutils import cli_integration as cli
|
7 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
7 | 8 |
|
8 | 9 |
|
9 | 10 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -30,6 +31,7 @@ def create_script_element(name, path, config={}, variables={}): |
30 | 31 |
|
31 | 32 |
|
32 | 33 |
@pytest.mark.datafiles(DATA_DIR)
|
34 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
33 | 35 |
def test_script(cli, tmpdir, datafiles):
|
34 | 36 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
35 | 37 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -57,6 +59,7 @@ def test_script(cli, tmpdir, datafiles): |
57 | 59 |
|
58 | 60 |
|
59 | 61 |
@pytest.mark.datafiles(DATA_DIR)
|
62 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
60 | 63 |
def test_script_root(cli, tmpdir, datafiles):
|
61 | 64 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
62 | 65 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -88,6 +91,7 @@ def test_script_root(cli, tmpdir, datafiles): |
88 | 91 |
|
89 | 92 |
|
90 | 93 |
@pytest.mark.datafiles(DATA_DIR)
|
94 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
91 | 95 |
def test_script_no_root(cli, tmpdir, datafiles):
|
92 | 96 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
93 | 97 |
element_path = os.path.join(project, 'elements')
|
... | ... | @@ -110,6 +114,7 @@ def test_script_no_root(cli, tmpdir, datafiles): |
110 | 114 |
|
111 | 115 |
|
112 | 116 |
@pytest.mark.datafiles(DATA_DIR)
|
117 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
113 | 118 |
def test_script_cwd(cli, tmpdir, datafiles):
|
114 | 119 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
115 | 120 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -140,6 +145,7 @@ def test_script_cwd(cli, tmpdir, datafiles): |
140 | 145 |
|
141 | 146 |
|
142 | 147 |
@pytest.mark.datafiles(DATA_DIR)
|
148 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
143 | 149 |
def test_script_layout(cli, tmpdir, datafiles):
|
144 | 150 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
145 | 151 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -158,6 +164,7 @@ def test_script_layout(cli, tmpdir, datafiles): |
158 | 164 |
|
159 | 165 |
|
160 | 166 |
@pytest.mark.datafiles(DATA_DIR)
|
167 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
161 | 168 |
def test_regression_cache_corruption(cli, tmpdir, datafiles):
|
162 | 169 |
project = str(datafiles)
|
163 | 170 |
checkout_original = os.path.join(cli.directory, 'checkout-original')
|
... | ... | @@ -187,6 +194,7 @@ def test_regression_cache_corruption(cli, tmpdir, datafiles): |
187 | 194 |
|
188 | 195 |
|
189 | 196 |
@pytest.mark.datafiles(DATA_DIR)
|
197 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
190 | 198 |
def test_regression_tmpdir(cli, tmpdir, datafiles):
|
191 | 199 |
project = str(datafiles)
|
192 | 200 |
element_name = 'script/tmpdir.bst'
|
... | ... | @@ -196,6 +204,7 @@ def test_regression_tmpdir(cli, tmpdir, datafiles): |
196 | 204 |
|
197 | 205 |
|
198 | 206 |
@pytest.mark.datafiles(DATA_DIR)
|
207 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
199 | 208 |
def test_regression_cache_corruption_2(cli, tmpdir, datafiles):
|
200 | 209 |
project = str(datafiles)
|
201 | 210 |
checkout_original = os.path.join(cli.directory, 'checkout-original')
|
... | ... | @@ -5,6 +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
|
8 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
8 | 9 |
|
9 | 10 |
|
10 | 11 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -48,6 +49,7 @@ def execute_shell(cli, project, command, *, config=None, mount=None, element='ba |
48 | 49 |
# Test running something through a shell, allowing it to find the
|
49 | 50 |
# executable
|
50 | 51 |
@pytest.mark.datafiles(DATA_DIR)
|
52 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
51 | 53 |
def test_shell(cli, tmpdir, datafiles):
|
52 | 54 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
53 | 55 |
|
... | ... | @@ -58,6 +60,7 @@ def test_shell(cli, tmpdir, datafiles): |
58 | 60 |
|
59 | 61 |
# Test running an executable directly
|
60 | 62 |
@pytest.mark.datafiles(DATA_DIR)
|
63 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
61 | 64 |
def test_executable(cli, tmpdir, datafiles):
|
62 | 65 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
63 | 66 |
|
... | ... | @@ -69,6 +72,7 @@ def test_executable(cli, tmpdir, datafiles): |
69 | 72 |
# Test shell environment variable explicit assignments
|
70 | 73 |
@pytest.mark.parametrize("animal", [("Horse"), ("Pony")])
|
71 | 74 |
@pytest.mark.datafiles(DATA_DIR)
|
75 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
72 | 76 |
def test_env_assign(cli, tmpdir, datafiles, animal):
|
73 | 77 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
74 | 78 |
expected = animal + '\n'
|
... | ... | @@ -88,6 +92,7 @@ def test_env_assign(cli, tmpdir, datafiles, animal): |
88 | 92 |
# Test shell environment variable explicit assignments with host env var expansion
|
89 | 93 |
@pytest.mark.parametrize("animal", [("Horse"), ("Pony")])
|
90 | 94 |
@pytest.mark.datafiles(DATA_DIR)
|
95 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
91 | 96 |
def test_env_assign_expand_host_environ(cli, tmpdir, datafiles, animal):
|
92 | 97 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
93 | 98 |
expected = 'The animal is: {}\n'.format(animal)
|
... | ... | @@ -110,6 +115,7 @@ def test_env_assign_expand_host_environ(cli, tmpdir, datafiles, animal): |
110 | 115 |
# when running an isolated shell
|
111 | 116 |
@pytest.mark.parametrize("animal", [("Horse"), ("Pony")])
|
112 | 117 |
@pytest.mark.datafiles(DATA_DIR)
|
118 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
113 | 119 |
def test_env_assign_isolated(cli, tmpdir, datafiles, animal):
|
114 | 120 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
115 | 121 |
result = execute_shell(cli, project, ['/bin/sh', '-c', 'echo ${ANIMAL}'], isolate=True, config={
|
... | ... | @@ -127,6 +133,7 @@ def test_env_assign_isolated(cli, tmpdir, datafiles, animal): |
127 | 133 |
# Test running an executable in a runtime with no shell (i.e., no
|
128 | 134 |
# /bin/sh)
|
129 | 135 |
@pytest.mark.datafiles(DATA_DIR)
|
136 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
130 | 137 |
def test_no_shell(cli, tmpdir, datafiles):
|
131 | 138 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
132 | 139 |
element_path = os.path.join(project, 'elements')
|
... | ... | @@ -159,6 +166,7 @@ def test_no_shell(cli, tmpdir, datafiles): |
159 | 166 |
# Test that bind mounts defined in project.conf work
|
160 | 167 |
@pytest.mark.parametrize("path", [("/etc/pony.conf"), ("/usr/share/pony/pony.txt")])
|
161 | 168 |
@pytest.mark.datafiles(DATA_DIR)
|
169 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
162 | 170 |
def test_host_files(cli, tmpdir, datafiles, path):
|
163 | 171 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
164 | 172 |
ponyfile = os.path.join(project, 'files', 'shell-mount', 'pony.txt')
|
... | ... | @@ -179,6 +187,7 @@ def test_host_files(cli, tmpdir, datafiles, path): |
179 | 187 |
# Test that bind mounts defined in project.conf work
|
180 | 188 |
@pytest.mark.parametrize("path", [("/etc"), ("/usr/share/pony")])
|
181 | 189 |
@pytest.mark.datafiles(DATA_DIR)
|
190 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
182 | 191 |
def test_host_files_expand_environ(cli, tmpdir, datafiles, path):
|
183 | 192 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
184 | 193 |
hostpath = os.path.join(project, 'files', 'shell-mount')
|
... | ... | @@ -224,6 +233,7 @@ def test_isolated_no_mount(cli, tmpdir, datafiles, path): |
224 | 233 |
# declared as optional, and that there is no warning if it is optional
|
225 | 234 |
@pytest.mark.parametrize("optional", [("mandatory"), ("optional")])
|
226 | 235 |
@pytest.mark.datafiles(DATA_DIR)
|
236 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
227 | 237 |
def test_host_files_missing(cli, tmpdir, datafiles, optional):
|
228 | 238 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
229 | 239 |
ponyfile = os.path.join(project, 'files', 'shell-mount', 'horsy.txt')
|
... | ... | @@ -259,6 +269,7 @@ def test_host_files_missing(cli, tmpdir, datafiles, optional): |
259 | 269 |
# Test that bind mounts defined in project.conf work
|
260 | 270 |
@pytest.mark.parametrize("path", [("/etc/pony.conf"), ("/usr/share/pony/pony.txt")])
|
261 | 271 |
@pytest.mark.datafiles(DATA_DIR)
|
272 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
262 | 273 |
def test_cli_mount(cli, tmpdir, datafiles, path):
|
263 | 274 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
264 | 275 |
ponyfile = os.path.join(project, 'files', 'shell-mount', 'pony.txt')
|
... | ... | @@ -271,6 +282,7 @@ def test_cli_mount(cli, tmpdir, datafiles, path): |
271 | 282 |
# Test that we can see the workspace files in a shell
|
272 | 283 |
@pytest.mark.integration
|
273 | 284 |
@pytest.mark.datafiles(DATA_DIR)
|
285 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
274 | 286 |
def test_workspace_visible(cli, tmpdir, datafiles):
|
275 | 287 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
276 | 288 |
workspace = os.path.join(cli.directory, 'workspace')
|
... | ... | @@ -304,6 +316,7 @@ def test_workspace_visible(cli, tmpdir, datafiles): |
304 | 316 |
|
305 | 317 |
# Test that '--sysroot' works
|
306 | 318 |
@pytest.mark.datafiles(DATA_DIR)
|
319 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
307 | 320 |
def test_sysroot(cli, tmpdir, datafiles):
|
308 | 321 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
309 | 322 |
base_element = "base/base-alpine.bst"
|
... | ... | @@ -333,6 +346,7 @@ def test_sysroot(cli, tmpdir, datafiles): |
333 | 346 |
|
334 | 347 |
# Test system integration commands can access devices in /dev
|
335 | 348 |
@pytest.mark.datafiles(DATA_DIR)
|
349 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
336 | 350 |
def test_integration_devices(cli, tmpdir, datafiles):
|
337 | 351 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
338 | 352 |
element_name = 'integration.bst'
|
... | ... | @@ -5,6 +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 HAVE_BWRAP, IS_LINUX
|
|
8 | 9 |
|
9 | 10 |
|
10 | 11 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -16,6 +17,7 @@ DATA_DIR = os.path.join( |
16 | 17 |
|
17 | 18 |
|
18 | 19 |
@pytest.mark.datafiles(DATA_DIR)
|
20 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
19 | 21 |
def test_builddir_socket_ignored(cli, tmpdir, datafiles):
|
20 | 22 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
21 | 23 |
element_name = 'sockets/make-builddir-socket.bst'
|
... | ... | @@ -25,6 +27,7 @@ def test_builddir_socket_ignored(cli, tmpdir, datafiles): |
25 | 27 |
|
26 | 28 |
|
27 | 29 |
@pytest.mark.datafiles(DATA_DIR)
|
30 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
28 | 31 |
def test_install_root_socket_ignored(cli, tmpdir, datafiles):
|
29 | 32 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
30 | 33 |
element_name = 'sockets/make-install-root-socket.bst'
|
... | ... | @@ -4,6 +4,7 @@ import pytest |
4 | 4 |
from buildstream import _yaml, utils
|
5 | 5 |
from tests.testutils import create_repo, ALL_REPO_KINDS
|
6 | 6 |
from tests.testutils import cli_integration as cli
|
7 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
7 | 8 |
|
8 | 9 |
|
9 | 10 |
DATA_DIR = os.path.join(
|
... | ... | @@ -29,6 +30,7 @@ def create_test_directory(*path, mode=0o644): |
29 | 30 |
@pytest.mark.integration
|
30 | 31 |
@pytest.mark.datafiles(DATA_DIR)
|
31 | 32 |
@pytest.mark.parametrize("kind", [(kind) for kind in ALL_REPO_KINDS] + ['local'])
|
33 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
32 | 34 |
def test_deterministic_source_umask(cli, tmpdir, datafiles, kind, integration_cache):
|
33 | 35 |
project = str(datafiles)
|
34 | 36 |
element_name = 'list'
|
... | ... | @@ -101,6 +103,7 @@ def test_deterministic_source_umask(cli, tmpdir, datafiles, kind, integration_ca |
101 | 103 |
|
102 | 104 |
@pytest.mark.integration
|
103 | 105 |
@pytest.mark.datafiles(DATA_DIR)
|
106 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
104 | 107 |
def test_deterministic_source_local(cli, tmpdir, datafiles, integration_cache):
|
105 | 108 |
"""Only user rights should be considered for local source.
|
106 | 109 |
"""
|
... | ... | @@ -4,6 +4,7 @@ import pytest |
4 | 4 |
from buildstream import _yaml
|
5 | 5 |
|
6 | 6 |
from tests.testutils import cli_integration as cli
|
7 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
7 | 8 |
|
8 | 9 |
|
9 | 10 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -16,6 +17,7 @@ DATA_DIR = os.path.join( |
16 | 17 |
|
17 | 18 |
|
18 | 19 |
@pytest.mark.datafiles(DATA_DIR)
|
20 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
19 | 21 |
def test_stack(cli, tmpdir, datafiles):
|
20 | 22 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
21 | 23 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -6,6 +6,7 @@ from buildstream import _yaml |
6 | 6 |
|
7 | 7 |
from tests.testutils import cli_integration as cli
|
8 | 8 |
from tests.testutils.integration import assert_contains
|
9 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
9 | 10 |
|
10 | 11 |
|
11 | 12 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -18,6 +19,7 @@ DATA_DIR = os.path.join( |
18 | 19 |
|
19 | 20 |
|
20 | 21 |
@pytest.mark.datafiles(DATA_DIR)
|
22 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
21 | 23 |
def test_absolute_symlinks_made_relative(cli, tmpdir, datafiles):
|
22 | 24 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
23 | 25 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -41,6 +43,7 @@ def test_absolute_symlinks_made_relative(cli, tmpdir, datafiles): |
41 | 43 |
|
42 | 44 |
|
43 | 45 |
@pytest.mark.datafiles(DATA_DIR)
|
46 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
44 | 47 |
def test_allow_overlaps_inside_symlink_with_dangling_target(cli, tmpdir, datafiles):
|
45 | 48 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
46 | 49 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -57,6 +60,7 @@ def test_allow_overlaps_inside_symlink_with_dangling_target(cli, tmpdir, datafil |
57 | 60 |
|
58 | 61 |
|
59 | 62 |
@pytest.mark.datafiles(DATA_DIR)
|
63 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
60 | 64 |
def test_detect_symlink_overlaps_pointing_outside_sandbox(cli, tmpdir, datafiles):
|
61 | 65 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
62 | 66 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -3,7 +3,7 @@ import pytest |
3 | 3 |
|
4 | 4 |
from buildstream import _yaml
|
5 | 5 |
from tests.testutils import cli_integration as cli
|
6 |
-from tests.testutils.site import IS_LINUX
|
|
6 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
7 | 7 |
from tests.testutils.integration import walk_dir
|
8 | 8 |
|
9 | 9 |
|
... | ... | @@ -18,6 +18,7 @@ DATA_DIR = os.path.join( |
18 | 18 |
|
19 | 19 |
@pytest.mark.integration
|
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_workspace_mount(cli, tmpdir, datafiles):
|
22 | 23 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
23 | 24 |
workspace = os.path.join(cli.directory, 'workspace')
|
... | ... | @@ -34,6 +35,7 @@ def test_workspace_mount(cli, tmpdir, datafiles): |
34 | 35 |
|
35 | 36 |
@pytest.mark.integration
|
36 | 37 |
@pytest.mark.datafiles(DATA_DIR)
|
38 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
37 | 39 |
def test_workspace_commanddir(cli, tmpdir, datafiles):
|
38 | 40 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
39 | 41 |
workspace = os.path.join(cli.directory, 'workspace')
|
... | ... | @@ -51,6 +53,7 @@ def test_workspace_commanddir(cli, tmpdir, datafiles): |
51 | 53 |
|
52 | 54 |
@pytest.mark.integration
|
53 | 55 |
@pytest.mark.datafiles(DATA_DIR)
|
56 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
54 | 57 |
def test_workspace_updated_dependency(cli, tmpdir, datafiles):
|
55 | 58 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
56 | 59 |
workspace = os.path.join(cli.directory, 'workspace')
|
... | ... | @@ -105,6 +108,7 @@ def test_workspace_updated_dependency(cli, tmpdir, datafiles): |
105 | 108 |
|
106 | 109 |
@pytest.mark.integration
|
107 | 110 |
@pytest.mark.datafiles(DATA_DIR)
|
111 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
108 | 112 |
def test_workspace_update_dependency_failed(cli, tmpdir, datafiles):
|
109 | 113 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
110 | 114 |
workspace = os.path.join(cli.directory, 'workspace')
|
... | ... | @@ -180,6 +184,7 @@ def test_workspace_update_dependency_failed(cli, tmpdir, datafiles): |
180 | 184 |
|
181 | 185 |
@pytest.mark.integration
|
182 | 186 |
@pytest.mark.datafiles(DATA_DIR)
|
187 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
183 | 188 |
def test_updated_dependency_nested(cli, tmpdir, datafiles):
|
184 | 189 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
185 | 190 |
workspace = os.path.join(cli.directory, 'workspace')
|
... | ... | @@ -233,6 +238,7 @@ def test_updated_dependency_nested(cli, tmpdir, datafiles): |
233 | 238 |
|
234 | 239 |
@pytest.mark.integration
|
235 | 240 |
@pytest.mark.datafiles(DATA_DIR)
|
241 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
236 | 242 |
def test_incremental_configure_commands_run_only_once(cli, tmpdir, datafiles):
|
237 | 243 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
238 | 244 |
workspace = os.path.join(cli.directory, 'workspace')
|