Jonathan Maw pushed to branch jonathan/wsl-tests at BuildStream / buildstream
Commits:
21 changed files:
- 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/messages.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
- tests/testutils/filetypegenerator.py
- tests/testutils/site.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 HAVE_BWRAP, IS_LINUX
 | |
| 6 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 7 | 7 |  | 
| 8 | 8 |  | 
| 9 | 9 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -19,7 +19,7 @@ DATA_DIR = os.path.join( | 
| 19 | 19 |  # amhello project for this.
 | 
| 20 | 20 |  @pytest.mark.integration
 | 
| 21 | 21 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 22 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 22 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 23 | 23 |  def test_autotools_build(cli, tmpdir, datafiles):
 | 
| 24 | 24 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 25 | 25 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -42,7 +42,7 @@ def test_autotools_build(cli, tmpdir, datafiles): | 
| 42 | 42 |  # amhello project for this.
 | 
| 43 | 43 |  @pytest.mark.integration
 | 
| 44 | 44 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 45 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 45 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 46 | 46 |  def test_autotools_confroot_build(cli, tmpdir, datafiles):
 | 
| 47 | 47 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 48 | 48 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -63,7 +63,7 @@ def test_autotools_confroot_build(cli, tmpdir, datafiles): | 
| 63 | 63 |  | 
| 64 | 64 |  # Test running an executable built with autotools
 | 
| 65 | 65 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 66 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 66 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 67 | 67 |  def test_autotools_run(cli, tmpdir, datafiles):
 | 
| 68 | 68 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 69 | 69 |      element_name = 'autotools/amhello.bst'
 | 
| ... | ... | @@ -3,7 +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 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 7 | 7 |  from buildstream._exceptions import ErrorDomain
 | 
| 8 | 8 |  | 
| 9 | 9 |  | 
| ... | ... | @@ -17,7 +17,7 @@ DATA_DIR = os.path.join( | 
| 17 | 17 |  | 
| 18 | 18 |  | 
| 19 | 19 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 20 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 20 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 21 | 21 |  def test_buildtree_staged(cli_integration, tmpdir, datafiles):
 | 
| 22 | 22 |      # We can only test the non interacitve case
 | 
| 23 | 23 |      # The non interactive case defaults to not using buildtrees
 | 
| ... | ... | @@ -35,7 +35,7 @@ def test_buildtree_staged(cli_integration, tmpdir, datafiles): | 
| 35 | 35 |  | 
| 36 | 36 |  | 
| 37 | 37 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 38 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 38 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 39 | 39 |  def test_buildtree_staged_forced_true(cli_integration, tmpdir, datafiles):
 | 
| 40 | 40 |      # Test that if we ask for a build tree it is there.
 | 
| 41 | 41 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| ... | ... | @@ -52,7 +52,7 @@ def test_buildtree_staged_forced_true(cli_integration, tmpdir, datafiles): | 
| 52 | 52 |  | 
| 53 | 53 |  | 
| 54 | 54 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 55 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 55 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 56 | 56 |  def test_buildtree_staged_if_available(cli_integration, tmpdir, datafiles):
 | 
| 57 | 57 |      # Test that a build tree can be correctly detected.
 | 
| 58 | 58 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| ... | ... | @@ -69,7 +69,7 @@ def test_buildtree_staged_if_available(cli_integration, tmpdir, datafiles): | 
| 69 | 69 |  | 
| 70 | 70 |  | 
| 71 | 71 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 72 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 72 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 73 | 73 |  def test_buildtree_staged_forced_false(cli_integration, tmpdir, datafiles):
 | 
| 74 | 74 |      # Test that if we ask not to have a build tree it is not there
 | 
| 75 | 75 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| ... | ... | @@ -87,7 +87,7 @@ def test_buildtree_staged_forced_false(cli_integration, tmpdir, datafiles): | 
| 87 | 87 |  | 
| 88 | 88 |  | 
| 89 | 89 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 90 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 90 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 91 | 91 |  def test_buildtree_from_failure(cli_integration, tmpdir, datafiles):
 | 
| 92 | 92 |      # Test that we can use a build tree after a failure
 | 
| 93 | 93 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| ... | ... | @@ -108,7 +108,7 @@ def test_buildtree_from_failure(cli_integration, tmpdir, datafiles): | 
| 108 | 108 |  # Check that build shells work when pulled from a remote cache
 | 
| 109 | 109 |  # This is to roughly simulate remote execution
 | 
| 110 | 110 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 111 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 111 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 112 | 112 |  def test_buildtree_pulled(cli, tmpdir, datafiles):
 | 
| 113 | 113 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 114 | 114 |      element_name = 'build-shell/buildtree.bst'
 | 
| ... | ... | @@ -143,7 +143,7 @@ def test_buildtree_pulled(cli, tmpdir, datafiles): | 
| 143 | 143 |  | 
| 144 | 144 |  # This test checks for correct behaviour if a buildtree is not present in the local cache.
 | 
| 145 | 145 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 146 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 146 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 147 | 147 |  def test_buildtree_options(cli, tmpdir, datafiles):
 | 
| 148 | 148 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 149 | 149 |      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 HAVE_BWRAP, IS_LINUX
 | |
| 8 | +from tests.testutils.site import HAVE_BWRAP, IS_LINUX, HAVE_SANDBOX
 | |
| 9 | 9 |  | 
| 10 | 10 |  | 
| 11 | 11 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -55,7 +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 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 59 | 59 |  def test_build_uid_default(cli, tmpdir, datafiles):
 | 
| 60 | 60 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 61 | 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 HAVE_BWRAP, IS_LINUX
 | |
| 10 | +from tests.testutils.site import HAVE_BWRAP, IS_LINUX, HAVE_SANDBOX
 | |
| 11 | 11 |  | 
| 12 | 12 |  | 
| 13 | 13 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -20,7 +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 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 24 | 24 |  def test_build_checkout_cached_fail(cli, tmpdir, datafiles):
 | 
| 25 | 25 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 26 | 26 |      element_path = os.path.join(project, 'elements', 'element.bst')
 | 
| ... | ... | @@ -64,7 +64,7 @@ def test_build_checkout_cached_fail(cli, tmpdir, datafiles): | 
| 64 | 64 |  | 
| 65 | 65 |  | 
| 66 | 66 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 67 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 67 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 68 | 68 |  def test_build_depend_on_cached_fail(cli, tmpdir, datafiles):
 | 
| 69 | 69 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 70 | 70 |      dep_path = os.path.join(project, 'elements', 'dep.bst')
 | 
| ... | ... | @@ -123,7 +123,7 @@ def test_build_depend_on_cached_fail(cli, tmpdir, datafiles): | 
| 123 | 123 |      assert cli.get_element_state(project, 'target.bst') == 'waiting'
 | 
| 124 | 124 |  | 
| 125 | 125 |  | 
| 126 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 126 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 127 | 127 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 128 | 128 |  @pytest.mark.parametrize("on_error", ("continue", "quit"))
 | 
| 129 | 129 |  def test_push_cached_fail(cli, tmpdir, datafiles, on_error):
 | 
| ... | ... | @@ -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 HAVE_BWRAP, IS_LINUX
 | |
| 6 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 7 | 7 |  | 
| 8 | 8 |  | 
| 9 | 9 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -16,7 +16,7 @@ DATA_DIR = os.path.join( | 
| 16 | 16 |  | 
| 17 | 17 |  | 
| 18 | 18 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 19 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 19 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 20 | 20 |  def test_cmake_build(cli, tmpdir, datafiles):
 | 
| 21 | 21 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 22 | 22 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -32,7 +32,7 @@ def test_cmake_build(cli, tmpdir, datafiles): | 
| 32 | 32 |  | 
| 33 | 33 |  | 
| 34 | 34 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 35 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 35 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 36 | 36 |  def test_cmake_confroot_build(cli, tmpdir, datafiles):
 | 
| 37 | 37 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 38 | 38 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -48,7 +48,7 @@ def test_cmake_confroot_build(cli, tmpdir, datafiles): | 
| 48 | 48 |  | 
| 49 | 49 |  | 
| 50 | 50 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 51 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 51 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 52 | 52 |  def test_cmake_run(cli, tmpdir, datafiles):
 | 
| 53 | 53 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 54 | 54 |      element_name = 'cmake/cmakehello.bst'
 | 
| ... | ... | @@ -7,7 +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 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 11 | 11 |  | 
| 12 | 12 |  | 
| 13 | 13 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -75,7 +75,7 @@ def create_compose_element(name, path, config={}): | 
| 75 | 75 |                      '/usr/share/doc', '/usr/share/doc/amhello',
 | 
| 76 | 76 |                      '/usr/share/doc/amhello/README'])
 | 
| 77 | 77 |  ])
 | 
| 78 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 78 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 79 | 79 |  def test_compose_include(cli, tmpdir, datafiles, include_domains,
 | 
| 80 | 80 |                           exclude_domains, expected):
 | 
| 81 | 81 |      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 HAVE_BWRAP, IS_LINUX
 | |
| 6 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 7 | 7 |  | 
| 8 | 8 |  | 
| 9 | 9 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -19,7 +19,7 @@ DATA_DIR = os.path.join( | 
| 19 | 19 |  # makehello project for this.
 | 
| 20 | 20 |  @pytest.mark.integration
 | 
| 21 | 21 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 22 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 22 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 23 | 23 |  def test_make_build(cli, tmpdir, datafiles):
 | 
| 24 | 24 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 25 | 25 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -37,7 +37,7 @@ def test_make_build(cli, tmpdir, datafiles): | 
| 37 | 37 |  | 
| 38 | 38 |  # Test running an executable built with make
 | 
| 39 | 39 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 40 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 40 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 41 | 41 |  def test_make_run(cli, tmpdir, datafiles):
 | 
| 42 | 42 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 43 | 43 |      element_name = 'make/makehello.bst'
 | 
| ... | ... | @@ -4,7 +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 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 8 | 8 |  | 
| 9 | 9 |  | 
| 10 | 10 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -32,7 +32,7 @@ def create_manual_element(name, path, config, variables, environment): | 
| 32 | 32 |  | 
| 33 | 33 |  | 
| 34 | 34 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 35 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 35 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 36 | 36 |  def test_manual_element(cli, tmpdir, datafiles):
 | 
| 37 | 37 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 38 | 38 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -66,7 +66,7 @@ strip | 
| 66 | 66 |  | 
| 67 | 67 |  | 
| 68 | 68 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 69 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 69 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 70 | 70 |  def test_manual_element_environment(cli, tmpdir, datafiles):
 | 
| 71 | 71 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 72 | 72 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -96,7 +96,7 @@ def test_manual_element_environment(cli, tmpdir, datafiles): | 
| 96 | 96 |  | 
| 97 | 97 |  | 
| 98 | 98 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 99 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 99 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 100 | 100 |  def test_manual_element_noparallel(cli, tmpdir, datafiles):
 | 
| 101 | 101 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 102 | 102 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -131,7 +131,7 @@ def test_manual_element_noparallel(cli, tmpdir, datafiles): | 
| 131 | 131 |  | 
| 132 | 132 |  | 
| 133 | 133 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 134 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 134 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 135 | 135 |  def test_manual_element_logging(cli, tmpdir, datafiles):
 | 
| 136 | 136 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 137 | 137 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -24,7 +24,7 @@ from buildstream import _yaml | 
| 24 | 24 |  from buildstream._exceptions import ErrorDomain
 | 
| 25 | 25 |  | 
| 26 | 26 |  from tests.testutils import cli_integration as cli
 | 
| 27 | -from tests.testutils.site import HAVE_BWRAP, IS_LINUX
 | |
| 27 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 28 | 28 |  | 
| 29 | 29 |  | 
| 30 | 30 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -39,7 +39,7 @@ DATA_DIR = os.path.join( | 
| 39 | 39 |  | 
| 40 | 40 |  @pytest.mark.integration
 | 
| 41 | 41 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 42 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 42 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 43 | 43 |  def test_disable_message_lines(cli, tmpdir, datafiles):
 | 
| 44 | 44 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 45 | 45 |      element_path = os.path.join(project, 'elements')
 | 
| ... | ... | @@ -75,7 +75,7 @@ def test_disable_message_lines(cli, tmpdir, datafiles): | 
| 75 | 75 |  | 
| 76 | 76 |  @pytest.mark.integration
 | 
| 77 | 77 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 78 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 78 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 79 | 79 |  def test_disable_error_lines(cli, tmpdir, datafiles):
 | 
| 80 | 80 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 81 | 81 |      element_path = os.path.join(project, 'elements')
 | 
| ... | ... | @@ -6,7 +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 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 10 | 10 |  | 
| 11 | 11 |  | 
| 12 | 12 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -19,7 +19,7 @@ DATA_DIR = os.path.join( | 
| 19 | 19 |  | 
| 20 | 20 |  | 
| 21 | 21 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 22 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 22 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 23 | 23 |  def test_pip_build(cli, tmpdir, datafiles):
 | 
| 24 | 24 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 25 | 25 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -56,7 +56,7 @@ def test_pip_build(cli, tmpdir, datafiles): | 
| 56 | 56 |  | 
| 57 | 57 |  # Test running an executable built with pip
 | 
| 58 | 58 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 59 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 59 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 60 | 60 |  def test_pip_run(cli, tmpdir, datafiles):
 | 
| 61 | 61 |      # Create and build our test element
 | 
| 62 | 62 |      test_pip_build(cli, tmpdir, datafiles)
 | 
| ... | ... | @@ -6,7 +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 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 10 | 10 |  | 
| 11 | 11 |  | 
| 12 | 12 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -73,7 +73,7 @@ def test_pip_source_import(cli, tmpdir, datafiles, setup_pypi_repo): | 
| 73 | 73 |  | 
| 74 | 74 |  | 
| 75 | 75 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 76 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 76 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 77 | 77 |  def test_pip_source_build(cli, tmpdir, datafiles, setup_pypi_repo):
 | 
| 78 | 78 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 79 | 79 |      element_path = os.path.join(project, 'elements')
 | 
| ... | ... | @@ -4,7 +4,7 @@ import pytest | 
| 4 | 4 |  | 
| 5 | 5 |  from tests.testutils import cli, cli_integration as cli2, create_artifact_share
 | 
| 6 | 6 |  from tests.testutils.integration import assert_contains
 | 
| 7 | -from tests.testutils.site import HAVE_BWRAP, IS_LINUX
 | |
| 7 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 8 | 8 |  from buildstream._exceptions import ErrorDomain, LoadErrorReason
 | 
| 9 | 9 |  | 
| 10 | 10 |  | 
| ... | ... | @@ -31,7 +31,7 @@ def default_state(cli, tmpdir, share): | 
| 31 | 31 |  # directory of an element.
 | 
| 32 | 32 |  @pytest.mark.integration
 | 
| 33 | 33 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 34 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 34 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 35 | 35 |  def test_pullbuildtrees(cli2, tmpdir, datafiles):
 | 
| 36 | 36 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 37 | 37 |      element_name = 'autotools/amhello.bst'
 | 
| ... | ... | @@ -4,7 +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 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 8 | 8 |  | 
| 9 | 9 |  | 
| 10 | 10 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -31,7 +31,7 @@ def create_script_element(name, path, config={}, variables={}): | 
| 31 | 31 |  | 
| 32 | 32 |  | 
| 33 | 33 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 34 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 34 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 35 | 35 |  def test_script(cli, tmpdir, datafiles):
 | 
| 36 | 36 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 37 | 37 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -59,7 +59,7 @@ def test_script(cli, tmpdir, datafiles): | 
| 59 | 59 |  | 
| 60 | 60 |  | 
| 61 | 61 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 62 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 62 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 63 | 63 |  def test_script_root(cli, tmpdir, datafiles):
 | 
| 64 | 64 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 65 | 65 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -91,7 +91,7 @@ def test_script_root(cli, tmpdir, datafiles): | 
| 91 | 91 |  | 
| 92 | 92 |  | 
| 93 | 93 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 94 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 94 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 95 | 95 |  def test_script_no_root(cli, tmpdir, datafiles):
 | 
| 96 | 96 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 97 | 97 |      element_path = os.path.join(project, 'elements')
 | 
| ... | ... | @@ -114,7 +114,7 @@ def test_script_no_root(cli, tmpdir, datafiles): | 
| 114 | 114 |  | 
| 115 | 115 |  | 
| 116 | 116 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 117 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 117 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 118 | 118 |  def test_script_cwd(cli, tmpdir, datafiles):
 | 
| 119 | 119 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 120 | 120 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -145,7 +145,7 @@ def test_script_cwd(cli, tmpdir, datafiles): | 
| 145 | 145 |  | 
| 146 | 146 |  | 
| 147 | 147 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 148 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 148 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 149 | 149 |  def test_script_layout(cli, tmpdir, datafiles):
 | 
| 150 | 150 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 151 | 151 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -164,7 +164,7 @@ def test_script_layout(cli, tmpdir, datafiles): | 
| 164 | 164 |  | 
| 165 | 165 |  | 
| 166 | 166 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 167 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 167 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 168 | 168 |  def test_regression_cache_corruption(cli, tmpdir, datafiles):
 | 
| 169 | 169 |      project = str(datafiles)
 | 
| 170 | 170 |      checkout_original = os.path.join(cli.directory, 'checkout-original')
 | 
| ... | ... | @@ -194,7 +194,7 @@ def test_regression_cache_corruption(cli, tmpdir, datafiles): | 
| 194 | 194 |  | 
| 195 | 195 |  | 
| 196 | 196 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 197 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 197 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 198 | 198 |  def test_regression_tmpdir(cli, tmpdir, datafiles):
 | 
| 199 | 199 |      project = str(datafiles)
 | 
| 200 | 200 |      element_name = 'script/tmpdir.bst'
 | 
| ... | ... | @@ -204,7 +204,7 @@ def test_regression_tmpdir(cli, tmpdir, datafiles): | 
| 204 | 204 |  | 
| 205 | 205 |  | 
| 206 | 206 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 207 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 207 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 208 | 208 |  def test_regression_cache_corruption_2(cli, tmpdir, datafiles):
 | 
| 209 | 209 |      project = str(datafiles)
 | 
| 210 | 210 |      checkout_original = os.path.join(cli.directory, 'checkout-original')
 | 
| ... | ... | @@ -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
 | 
| 8 | -from tests.testutils.site import HAVE_BWRAP, IS_LINUX
 | |
| 8 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 9 | 9 |  | 
| 10 | 10 |  | 
| 11 | 11 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -49,7 +49,7 @@ def execute_shell(cli, project, command, *, config=None, mount=None, element='ba | 
| 49 | 49 |  # Test running something through a shell, allowing it to find the
 | 
| 50 | 50 |  # executable
 | 
| 51 | 51 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 52 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 52 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 53 | 53 |  def test_shell(cli, tmpdir, datafiles):
 | 
| 54 | 54 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 55 | 55 |  | 
| ... | ... | @@ -60,7 +60,7 @@ def test_shell(cli, tmpdir, datafiles): | 
| 60 | 60 |  | 
| 61 | 61 |  # Test running an executable directly
 | 
| 62 | 62 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 63 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 63 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 64 | 64 |  def test_executable(cli, tmpdir, datafiles):
 | 
| 65 | 65 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 66 | 66 |  | 
| ... | ... | @@ -72,7 +72,7 @@ def test_executable(cli, tmpdir, datafiles): | 
| 72 | 72 |  # Test shell environment variable explicit assignments
 | 
| 73 | 73 |  @pytest.mark.parametrize("animal", [("Horse"), ("Pony")])
 | 
| 74 | 74 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 75 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 75 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 76 | 76 |  def test_env_assign(cli, tmpdir, datafiles, animal):
 | 
| 77 | 77 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 78 | 78 |      expected = animal + '\n'
 | 
| ... | ... | @@ -92,7 +92,7 @@ def test_env_assign(cli, tmpdir, datafiles, animal): | 
| 92 | 92 |  # Test shell environment variable explicit assignments with host env var expansion
 | 
| 93 | 93 |  @pytest.mark.parametrize("animal", [("Horse"), ("Pony")])
 | 
| 94 | 94 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 95 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 95 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 96 | 96 |  def test_env_assign_expand_host_environ(cli, tmpdir, datafiles, animal):
 | 
| 97 | 97 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 98 | 98 |      expected = 'The animal is: {}\n'.format(animal)
 | 
| ... | ... | @@ -115,7 +115,7 @@ def test_env_assign_expand_host_environ(cli, tmpdir, datafiles, animal): | 
| 115 | 115 |  # when running an isolated shell
 | 
| 116 | 116 |  @pytest.mark.parametrize("animal", [("Horse"), ("Pony")])
 | 
| 117 | 117 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 118 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 118 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 119 | 119 |  def test_env_assign_isolated(cli, tmpdir, datafiles, animal):
 | 
| 120 | 120 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 121 | 121 |      result = execute_shell(cli, project, ['/bin/sh', '-c', 'echo ${ANIMAL}'], isolate=True, config={
 | 
| ... | ... | @@ -133,7 +133,7 @@ def test_env_assign_isolated(cli, tmpdir, datafiles, animal): | 
| 133 | 133 |  # Test running an executable in a runtime with no shell (i.e., no
 | 
| 134 | 134 |  # /bin/sh)
 | 
| 135 | 135 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 136 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 136 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 137 | 137 |  def test_no_shell(cli, tmpdir, datafiles):
 | 
| 138 | 138 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 139 | 139 |      element_path = os.path.join(project, 'elements')
 | 
| ... | ... | @@ -166,7 +166,7 @@ def test_no_shell(cli, tmpdir, datafiles): | 
| 166 | 166 |  # Test that bind mounts defined in project.conf work
 | 
| 167 | 167 |  @pytest.mark.parametrize("path", [("/etc/pony.conf"), ("/usr/share/pony/pony.txt")])
 | 
| 168 | 168 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 169 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 169 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 170 | 170 |  def test_host_files(cli, tmpdir, datafiles, path):
 | 
| 171 | 171 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 172 | 172 |      ponyfile = os.path.join(project, 'files', 'shell-mount', 'pony.txt')
 | 
| ... | ... | @@ -187,7 +187,7 @@ def test_host_files(cli, tmpdir, datafiles, path): | 
| 187 | 187 |  # Test that bind mounts defined in project.conf work
 | 
| 188 | 188 |  @pytest.mark.parametrize("path", [("/etc"), ("/usr/share/pony")])
 | 
| 189 | 189 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 190 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 190 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 191 | 191 |  def test_host_files_expand_environ(cli, tmpdir, datafiles, path):
 | 
| 192 | 192 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 193 | 193 |      hostpath = os.path.join(project, 'files', 'shell-mount')
 | 
| ... | ... | @@ -233,7 +233,7 @@ def test_isolated_no_mount(cli, tmpdir, datafiles, path): | 
| 233 | 233 |  # declared as optional, and that there is no warning if it is optional
 | 
| 234 | 234 |  @pytest.mark.parametrize("optional", [("mandatory"), ("optional")])
 | 
| 235 | 235 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 236 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 236 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 237 | 237 |  def test_host_files_missing(cli, tmpdir, datafiles, optional):
 | 
| 238 | 238 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 239 | 239 |      ponyfile = os.path.join(project, 'files', 'shell-mount', 'horsy.txt')
 | 
| ... | ... | @@ -269,7 +269,7 @@ def test_host_files_missing(cli, tmpdir, datafiles, optional): | 
| 269 | 269 |  # Test that bind mounts defined in project.conf work
 | 
| 270 | 270 |  @pytest.mark.parametrize("path", [("/etc/pony.conf"), ("/usr/share/pony/pony.txt")])
 | 
| 271 | 271 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 272 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 272 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 273 | 273 |  def test_cli_mount(cli, tmpdir, datafiles, path):
 | 
| 274 | 274 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 275 | 275 |      ponyfile = os.path.join(project, 'files', 'shell-mount', 'pony.txt')
 | 
| ... | ... | @@ -282,7 +282,7 @@ def test_cli_mount(cli, tmpdir, datafiles, path): | 
| 282 | 282 |  # Test that we can see the workspace files in a shell
 | 
| 283 | 283 |  @pytest.mark.integration
 | 
| 284 | 284 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 285 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 285 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 286 | 286 |  def test_workspace_visible(cli, tmpdir, datafiles):
 | 
| 287 | 287 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 288 | 288 |      workspace = os.path.join(cli.directory, 'workspace')
 | 
| ... | ... | @@ -316,7 +316,7 @@ def test_workspace_visible(cli, tmpdir, datafiles): | 
| 316 | 316 |  | 
| 317 | 317 |  # Test that '--sysroot' works
 | 
| 318 | 318 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 319 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 319 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 320 | 320 |  def test_sysroot(cli, tmpdir, datafiles):
 | 
| 321 | 321 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 322 | 322 |      base_element = "base/base-alpine.bst"
 | 
| ... | ... | @@ -346,7 +346,7 @@ def test_sysroot(cli, tmpdir, datafiles): | 
| 346 | 346 |  | 
| 347 | 347 |  # Test system integration commands can access devices in /dev
 | 
| 348 | 348 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 349 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 349 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 350 | 350 |  def test_integration_devices(cli, tmpdir, datafiles):
 | 
| 351 | 351 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 352 | 352 |      element_name = 'integration.bst'
 | 
| ... | ... | @@ -359,7 +359,7 @@ def test_integration_devices(cli, tmpdir, datafiles): | 
| 359 | 359 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 360 | 360 |  @pytest.mark.parametrize("build_shell", [("build"), ("nobuild")])
 | 
| 361 | 361 |  @pytest.mark.parametrize("guess_element", [True, False], ids=["guess", "no-guess"])
 | 
| 362 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 362 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 363 | 363 |  def test_integration_external_workspace(cli, tmpdir_factory, datafiles, build_shell, guess_element):
 | 
| 364 | 364 |      tmpdir = tmpdir_factory.mktemp("")
 | 
| 365 | 365 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| ... | ... | @@ -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 HAVE_BWRAP, IS_LINUX
 | |
| 8 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 9 | 9 |  | 
| 10 | 10 |  | 
| 11 | 11 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -17,7 +17,7 @@ DATA_DIR = os.path.join( | 
| 17 | 17 |  | 
| 18 | 18 |  | 
| 19 | 19 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 20 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 20 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 21 | 21 |  def test_builddir_socket_ignored(cli, tmpdir, datafiles):
 | 
| 22 | 22 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 23 | 23 |      element_name = 'sockets/make-builddir-socket.bst'
 | 
| ... | ... | @@ -27,7 +27,7 @@ def test_builddir_socket_ignored(cli, tmpdir, datafiles): | 
| 27 | 27 |  | 
| 28 | 28 |  | 
| 29 | 29 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 30 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 30 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 31 | 31 |  def test_install_root_socket_ignored(cli, tmpdir, datafiles):
 | 
| 32 | 32 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 33 | 33 |      element_name = 'sockets/make-install-root-socket.bst'
 | 
| ... | ... | @@ -4,7 +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 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 8 | 8 |  | 
| 9 | 9 |  | 
| 10 | 10 |  DATA_DIR = os.path.join(
 | 
| ... | ... | @@ -30,7 +30,7 @@ def create_test_directory(*path, mode=0o644): | 
| 30 | 30 |  @pytest.mark.integration
 | 
| 31 | 31 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 32 | 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')
 | |
| 33 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 34 | 34 |  def test_deterministic_source_umask(cli, tmpdir, datafiles, kind, integration_cache):
 | 
| 35 | 35 |      project = str(datafiles)
 | 
| 36 | 36 |      element_name = 'list.bst'
 | 
| ... | ... | @@ -103,7 +103,7 @@ def test_deterministic_source_umask(cli, tmpdir, datafiles, kind, integration_ca | 
| 103 | 103 |  | 
| 104 | 104 |  @pytest.mark.integration
 | 
| 105 | 105 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 106 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 106 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 107 | 107 |  def test_deterministic_source_local(cli, tmpdir, datafiles, integration_cache):
 | 
| 108 | 108 |      """Only user rights should be considered for local source.
 | 
| 109 | 109 |      """
 | 
| ... | ... | @@ -4,7 +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 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 8 | 8 |  | 
| 9 | 9 |  | 
| 10 | 10 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -17,7 +17,7 @@ DATA_DIR = os.path.join( | 
| 17 | 17 |  | 
| 18 | 18 |  | 
| 19 | 19 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 20 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 20 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 21 | 21 |  def test_stack(cli, tmpdir, datafiles):
 | 
| 22 | 22 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 23 | 23 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -6,7 +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 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 10 | 10 |  | 
| 11 | 11 |  | 
| 12 | 12 |  pytestmark = pytest.mark.integration
 | 
| ... | ... | @@ -19,7 +19,7 @@ DATA_DIR = os.path.join( | 
| 19 | 19 |  | 
| 20 | 20 |  | 
| 21 | 21 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 22 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 22 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 23 | 23 |  def test_absolute_symlinks_made_relative(cli, tmpdir, datafiles):
 | 
| 24 | 24 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 25 | 25 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -43,7 +43,7 @@ def test_absolute_symlinks_made_relative(cli, tmpdir, datafiles): | 
| 43 | 43 |  | 
| 44 | 44 |  | 
| 45 | 45 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 46 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 46 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 47 | 47 |  def test_allow_overlaps_inside_symlink_with_dangling_target(cli, tmpdir, datafiles):
 | 
| 48 | 48 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 49 | 49 |      checkout = os.path.join(cli.directory, 'checkout')
 | 
| ... | ... | @@ -60,7 +60,7 @@ def test_allow_overlaps_inside_symlink_with_dangling_target(cli, tmpdir, datafil | 
| 60 | 60 |  | 
| 61 | 61 |  | 
| 62 | 62 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 63 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 63 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 64 | 64 |  def test_detect_symlink_overlaps_pointing_outside_sandbox(cli, tmpdir, datafiles):
 | 
| 65 | 65 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 66 | 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 HAVE_BWRAP, IS_LINUX
 | |
| 6 | +from tests.testutils.site import HAVE_SANDBOX
 | |
| 7 | 7 |  from tests.testutils.integration import walk_dir
 | 
| 8 | 8 |  | 
| 9 | 9 |  | 
| ... | ... | @@ -18,7 +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 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 22 | 22 |  def test_workspace_mount(cli, tmpdir, datafiles):
 | 
| 23 | 23 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 24 | 24 |      workspace = os.path.join(cli.directory, 'workspace')
 | 
| ... | ... | @@ -35,7 +35,7 @@ def test_workspace_mount(cli, tmpdir, datafiles): | 
| 35 | 35 |  | 
| 36 | 36 |  @pytest.mark.integration
 | 
| 37 | 37 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 38 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 38 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 39 | 39 |  def test_workspace_commanddir(cli, tmpdir, datafiles):
 | 
| 40 | 40 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 41 | 41 |      workspace = os.path.join(cli.directory, 'workspace')
 | 
| ... | ... | @@ -53,7 +53,7 @@ def test_workspace_commanddir(cli, tmpdir, datafiles): | 
| 53 | 53 |  | 
| 54 | 54 |  @pytest.mark.integration
 | 
| 55 | 55 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 56 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 56 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 57 | 57 |  def test_workspace_updated_dependency(cli, tmpdir, datafiles):
 | 
| 58 | 58 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 59 | 59 |      workspace = os.path.join(cli.directory, 'workspace')
 | 
| ... | ... | @@ -108,7 +108,7 @@ def test_workspace_updated_dependency(cli, tmpdir, datafiles): | 
| 108 | 108 |  | 
| 109 | 109 |  @pytest.mark.integration
 | 
| 110 | 110 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 111 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 111 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 112 | 112 |  def test_workspace_update_dependency_failed(cli, tmpdir, datafiles):
 | 
| 113 | 113 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 114 | 114 |      workspace = os.path.join(cli.directory, 'workspace')
 | 
| ... | ... | @@ -184,7 +184,7 @@ def test_workspace_update_dependency_failed(cli, tmpdir, datafiles): | 
| 184 | 184 |  | 
| 185 | 185 |  @pytest.mark.integration
 | 
| 186 | 186 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 187 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 187 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 188 | 188 |  def test_updated_dependency_nested(cli, tmpdir, datafiles):
 | 
| 189 | 189 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 190 | 190 |      workspace = os.path.join(cli.directory, 'workspace')
 | 
| ... | ... | @@ -238,7 +238,7 @@ def test_updated_dependency_nested(cli, tmpdir, datafiles): | 
| 238 | 238 |  | 
| 239 | 239 |  @pytest.mark.integration
 | 
| 240 | 240 |  @pytest.mark.datafiles(DATA_DIR)
 | 
| 241 | -@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
 | |
| 241 | +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
 | |
| 242 | 242 |  def test_incremental_configure_commands_run_only_once(cli, tmpdir, datafiles):
 | 
| 243 | 243 |      project = os.path.join(datafiles.dirname, datafiles.basename)
 | 
| 244 | 244 |      workspace = os.path.join(cli.directory, 'workspace')
 | 
| ... | ... | @@ -56,7 +56,14 @@ def generate_file_types(path): | 
| 56 | 56 |      yield
 | 
| 57 | 57 |      clean()
 | 
| 58 | 58 |  | 
| 59 | +    # Change directory because the full path may be longer than the ~100
 | |
| 60 | +    # characters permitted for a unix socket
 | |
| 61 | +    old_dir = os.getcwd()
 | |
| 62 | +    parent, child = os.path.split(path)
 | |
| 63 | +    os.chdir(parent)
 | |
| 64 | + | |
| 59 | 65 |      s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
 | 
| 60 | -    s.bind(path)
 | |
| 66 | +    s.bind(child)
 | |
| 67 | +    os.chdir(old_dir)
 | |
| 61 | 68 |      yield
 | 
| 62 | 69 |      clean() | 
| ... | ... | @@ -4,6 +4,7 @@ | 
| 4 | 4 |  import os
 | 
| 5 | 5 |  import subprocess
 | 
| 6 | 6 |  import sys
 | 
| 7 | +import platform
 | |
| 7 | 8 |  | 
| 8 | 9 |  from buildstream import _site, utils, ProgramNotFoundError
 | 
| 9 | 10 |  from buildstream._platform import Platform
 | 
| ... | ... | @@ -57,6 +58,16 @@ except ImportError: | 
| 57 | 58 |      HAVE_ARPY = False
 | 
| 58 | 59 |  | 
| 59 | 60 |  IS_LINUX = os.getenv('BST_FORCE_BACKEND', sys.platform).startswith('linux')
 | 
| 61 | +IS_WSL = (IS_LINUX and 'Microsoft' in platform.uname().release)
 | |
| 60 | 62 |  IS_WINDOWS = (os.name == 'nt')
 | 
| 61 | 63 |  | 
| 64 | +if not IS_LINUX:
 | |
| 65 | +    HAVE_SANDBOX = True   # fallback to a chroot sandbox on unix
 | |
| 66 | +elif IS_WSL:
 | |
| 67 | +    HAVE_SANDBOX = False  # Sandboxes are inoperable under WSL due to lack of FUSE
 | |
| 68 | +elif IS_LINUX and HAVE_BWRAP:
 | |
| 69 | +    HAVE_SANDBOX = True
 | |
| 70 | +else:
 | |
| 71 | +    HAVE_SANDBOX = False
 | |
| 72 | + | |
| 62 | 73 |  MACHINE_ARCH = Platform.get_host_arch() | 
