[Notes] [Git][BuildStream/buildstream][danielsilverstone-ct/further-optimisations] 12 commits: gitlab-ci: Add commands to be run by WSL runners



Title: GitLab

Daniel Silverstone pushed to branch danielsilverstone-ct/further-optimisations at BuildStream / buildstream

Commits:

28 changed files:

Changes:

  • .gitlab-ci.yml
    1
    -image: buildstream/testsuite-debian:9-5da27168-32c47d1c
    
    1
    +image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-debian:9-master-46405991
    
    2 2
     
    
    3 3
     cache:
    
    4 4
       key: "$CI_JOB_NAME-"
    
    ... ... @@ -46,23 +46,23 @@ variables:
    46 46
         - .coverage-reports
    
    47 47
     
    
    48 48
     tests-debian-9:
    
    49
    -  image: buildstream/testsuite-debian:9-5da27168-32c47d1c
    
    49
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-debian:9-master-46405991
    
    50 50
       <<: *tests
    
    51 51
     
    
    52 52
     tests-fedora-27:
    
    53
    -  image: buildstream/testsuite-fedora:27-5da27168-32c47d1c
    
    53
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:27-master-46405991
    
    54 54
       <<: *tests
    
    55 55
     
    
    56 56
     tests-fedora-28:
    
    57
    -  image: buildstream/testsuite-fedora:28-5da27168-32c47d1c
    
    57
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991
    
    58 58
       <<: *tests
    
    59 59
     
    
    60 60
     tests-ubuntu-18.04:
    
    61
    -  image: buildstream/testsuite-ubuntu:18.04-5da27168-32c47d1c
    
    61
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-ubuntu:18.04-master-46405991
    
    62 62
       <<: *tests
    
    63 63
     
    
    64 64
     tests-python-3.7-stretch:
    
    65
    -  image: buildstream/testsuite-python:3.7-stretch-a60f0c39
    
    65
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-python:3.7-stretch-master-46405991
    
    66 66
       <<: *tests
    
    67 67
     
    
    68 68
       variables:
    
    ... ... @@ -73,10 +73,10 @@ tests-python-3.7-stretch:
    73 73
     
    
    74 74
     tests-centos-7.6:
    
    75 75
       <<: *tests
    
    76
    -  image: buildstream/testsuite-centos:7.6-5da27168-32c47d1c
    
    76
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-centos:7.6.1810-master-46405991
    
    77 77
     
    
    78 78
     overnight-fedora-28-aarch64:
    
    79
    -  image: buildstream/testsuite-fedora:aarch64-28-5da27168-32c47d1c
    
    79
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:aarch64-28-master-46405991
    
    80 80
       tags:
    
    81 81
         - aarch64
    
    82 82
       <<: *tests
    
    ... ... @@ -95,7 +95,7 @@ overnight-fedora-28-aarch64:
    95 95
     tests-unix:
    
    96 96
       # Use fedora here, to a) run a test on fedora and b) ensure that we
    
    97 97
       # can get rid of ostree - this is not possible with debian-8
    
    98
    -  image: buildstream/testsuite-fedora:27-5da27168-32c47d1c
    
    98
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:27-master-46405991
    
    99 99
       <<: *tests
    
    100 100
       variables:
    
    101 101
         BST_FORCE_BACKEND: "unix"
    
    ... ... @@ -105,7 +105,7 @@ tests-unix:
    105 105
         # We remove the Bubblewrap and OSTree packages here so that we catch any
    
    106 106
         # codepaths that try to use them. Removing OSTree causes fuse-libs to
    
    107 107
         # disappear unless we mark it as user-installed.
    
    108
    -    - dnf mark install fuse-libs
    
    108
    +    - dnf mark install fuse-libs systemd-udev
    
    109 109
         - dnf erase -y bubblewrap ostree
    
    110 110
     
    
    111 111
         # Since the unix platform is required to run as root, no user change required
    
    ... ... @@ -113,14 +113,14 @@ tests-unix:
    113 113
     
    
    114 114
     tests-fedora-missing-deps:
    
    115 115
       # Ensure that tests behave nicely while missing bwrap and ostree
    
    116
    -  image: buildstream/testsuite-fedora:28-5da27168-32c47d1c
    
    116
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991
    
    117 117
       <<: *tests
    
    118 118
     
    
    119 119
       script:
    
    120 120
         # We remove the Bubblewrap and OSTree packages here so that we catch any
    
    121 121
         # codepaths that try to use them. Removing OSTree causes fuse-libs to
    
    122 122
         # disappear unless we mark it as user-installed.
    
    123
    -    - dnf mark install fuse-libs
    
    123
    +    - dnf mark install fuse-libs systemd-udev
    
    124 124
         - dnf erase -y bubblewrap ostree
    
    125 125
     
    
    126 126
         - useradd -Um buildstream
    
    ... ... @@ -132,7 +132,7 @@ tests-fedora-update-deps:
    132 132
       # Check if the tests pass after updating requirements to their latest
    
    133 133
       # allowed version.
    
    134 134
       allow_failure: true
    
    135
    -  image: buildstream/testsuite-fedora:28-5da27168-32c47d1c
    
    135
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991
    
    136 136
       <<: *tests
    
    137 137
     
    
    138 138
       script:
    
    ... ... @@ -157,6 +157,20 @@ lint:
    157 157
       except:
    
    158 158
       - schedules
    
    159 159
     
    
    160
    +tests-wsl:
    
    161
    +  stage: test
    
    162
    +  variables:
    
    163
    +    LC_ALL: C.UTF-8
    
    164
    +    LANG: C.UTF-8
    
    165
    +  tags:
    
    166
    +  - wsl
    
    167
    +  before_script:
    
    168
    +  - mount
    
    169
    +  - df -h
    
    170
    +
    
    171
    +  script:
    
    172
    +  - "${TEST_COMMAND}"
    
    173
    +
    
    160 174
     # Automatically build documentation for every commit, we want to know
    
    161 175
     # if building documentation fails even if we're not deploying it.
    
    162 176
     docs:
    

  • buildstream/_cachekey.py
    ... ... @@ -40,3 +40,20 @@ def generate_key(value):
    40 40
         ordered = _yaml.node_sanitize(value)
    
    41 41
         string = pickle.dumps(ordered)
    
    42 42
         return hashlib.sha256(string).hexdigest()
    
    43
    +
    
    44
    +
    
    45
    +# generate_key_pre_sanitized()
    
    46
    +#
    
    47
    +# Generate an sha256 hex digest from the given value. The value
    
    48
    +# must be (a) compatible with generate_key() and (b) already have
    
    49
    +# been passed through _yaml.node_sanitize()
    
    50
    +#
    
    51
    +# Args:
    
    52
    +#    value: A sanitized value to get a key for
    
    53
    +#
    
    54
    +# Returns:
    
    55
    +#    (str): An sha256 hex digest of the given value
    
    56
    +#
    
    57
    +def generate_key_pre_sanitized(value):
    
    58
    +    string = pickle.dumps(value)
    
    59
    +    return hashlib.sha256(string).hexdigest()

  • buildstream/_loader/loadelement.py
    ... ... @@ -21,7 +21,7 @@
    21 21
     from collections.abc import Mapping
    
    22 22
     from itertools import count
    
    23 23
     
    
    24
    -from roaringbitmap import RoaringBitmap, ImmutableRoaringBitmap  # pylint: disable=no-name-in-module
    
    24
    +from pyroaring import BitMap, FrozenBitMap  # pylint: disable=no-name-in-module
    
    25 25
     
    
    26 26
     # BuildStream toplevel imports
    
    27 27
     from .._exceptions import LoadError, LoadErrorReason
    
    ... ... @@ -123,7 +123,7 @@ class LoadElement():
    123 123
             if self._dep_cache:
    
    124 124
                 return
    
    125 125
     
    
    126
    -        self._dep_cache = RoaringBitmap()
    
    126
    +        self._dep_cache = BitMap()
    
    127 127
     
    
    128 128
             for dep in self.dependencies:
    
    129 129
                 elt = dep.element
    
    ... ... @@ -137,7 +137,7 @@ class LoadElement():
    137 137
                 # And we depend on everything this element depends on
    
    138 138
                 self._dep_cache.update(elt._dep_cache)
    
    139 139
     
    
    140
    -        self._dep_cache = ImmutableRoaringBitmap(self._dep_cache)
    
    140
    +        self._dep_cache = FrozenBitMap(self._dep_cache)
    
    141 141
     
    
    142 142
     
    
    143 143
     # _extract_depends_from_node():
    

  • buildstream/_yaml.py
    ... ... @@ -365,8 +365,8 @@ _sentinel = object()
    365 365
     #
    
    366 366
     def node_get(node, expected_type, key, indices=None, *, default_value=_sentinel, allow_none=False):
    
    367 367
         value = node.get(key, default_value)
    
    368
    -    provenance = node_get_provenance(node)
    
    369 368
         if value is _sentinel:
    
    369
    +        provenance = node_get_provenance(node)
    
    370 370
             raise LoadError(LoadErrorReason.INVALID_DATA,
    
    371 371
                             "{}: Dictionary did not contain expected key '{}'".format(provenance, key))
    
    372 372
     
    
    ... ... @@ -922,9 +922,20 @@ RoundTripRepresenter.add_representer(SanitizedDict,
    922 922
     # Only dicts are ordered, list elements are left in order.
    
    923 923
     #
    
    924 924
     def node_sanitize(node):
    
    925
    +    # Short-circuit None which occurs ca. twice per element
    
    926
    +    if node is None:
    
    927
    +        return node
    
    928
    +
    
    929
    +    node_type = type(node)
    
    930
    +    # Next short-circuit integers, floats, strings, booleans, and tuples
    
    931
    +    if node_type in (int, float, str, bool, tuple):
    
    932
    +        return node
    
    933
    +    # Now short-circuit lists
    
    934
    +    elif node_type is list:
    
    935
    +        return [node_sanitize(elt) for elt in node]
    
    925 936
     
    
    926
    -    if isinstance(node, collections.abc.Mapping):
    
    927
    -
    
    937
    +    # Finally ChainMap and dict, and other Mappings need special handling
    
    938
    +    if node_type in (dict, ChainMap) or isinstance(node, collections.Mapping):
    
    928 939
             result = SanitizedDict()
    
    929 940
     
    
    930 941
             key_list = [key for key, _ in node_items(node)]
    
    ... ... @@ -932,10 +943,10 @@ def node_sanitize(node):
    932 943
                 result[key] = node_sanitize(node[key])
    
    933 944
     
    
    934 945
             return result
    
    935
    -
    
    936 946
         elif isinstance(node, list):
    
    937 947
             return [node_sanitize(elt) for elt in node]
    
    938 948
     
    
    949
    +    # Everything else (such as commented scalars) just gets returned as-is.
    
    939 950
         return node
    
    940 951
     
    
    941 952
     
    
    ... ... @@ -1063,16 +1074,48 @@ class ChainMap(collections.ChainMap):
    1063 1074
             except KeyError:
    
    1064 1075
                 return default
    
    1065 1076
     
    
    1077
    +# Node copying
    
    1078
    +#
    
    1079
    +# Unfortunately we copy nodes a *lot* and `isinstance()` is super-slow when
    
    1080
    +# things from collections.abc get involved.  The result is the following
    
    1081
    +# intricate but substantially faster group of tuples and the use of `in`.
    
    1082
    +#
    
    1083
    +# If any of the {node,list}_{chain_,}_copy routines raise a ValueError
    
    1084
    +# then it's likely additional types need adding to these tuples.
    
    1085
    +
    
    1086
    +# When chaining a copy, these types are skipped since the ChainMap will
    
    1087
    +# retrieve them from the source node when needed.  Other copiers might copy
    
    1088
    +# them, so we call them __quick_types.
    
    1089
    +__quick_types = (str, bool,
    
    1090
    +                 yaml.scalarstring.PreservedScalarString,
    
    1091
    +                 yaml.scalarstring.SingleQuotedScalarString,
    
    1092
    +                 yaml.scalarstring.DoubleQuotedScalarString)
    
    1093
    +
    
    1094
    +# These types have to be iterated like a dictionary
    
    1095
    +__dict_types = (dict, ChainMap, yaml.comments.CommentedMap)
    
    1096
    +
    
    1097
    +# These types have to be iterated like a list
    
    1098
    +__list_types = (list, yaml.comments.CommentedSeq)
    
    1099
    +
    
    1100
    +# These are the provenance types, which have to be cloned rather than any other
    
    1101
    +# copying tactic.
    
    1102
    +__provenance_types = (Provenance, DictProvenance, MemberProvenance, ElementProvenance)
    
    1103
    +
    
    1066 1104
     
    
    1067 1105
     def node_chain_copy(source):
    
    1068 1106
         copy = ChainMap({}, source)
    
    1069 1107
         for key, value in source.items():
    
    1070
    -        if isinstance(value, collections.abc.Mapping):
    
    1108
    +        value_type = type(value)
    
    1109
    +        if value_type in __dict_types:
    
    1071 1110
                 copy[key] = node_chain_copy(value)
    
    1072
    -        elif isinstance(value, list):
    
    1111
    +        elif value_type in __list_types:
    
    1073 1112
                 copy[key] = list_chain_copy(value)
    
    1074
    -        elif isinstance(value, Provenance):
    
    1113
    +        elif value_type in __provenance_types:
    
    1075 1114
                 copy[key] = value.clone()
    
    1115
    +        elif value_type in __quick_types:
    
    1116
    +            pass  # No need to copy these, the chainmap deals with it
    
    1117
    +        else:
    
    1118
    +            raise ValueError("Unable to be quick about node_chain_copy of {}".format(value_type))
    
    1076 1119
     
    
    1077 1120
         return copy
    
    1078 1121
     
    
    ... ... @@ -1080,14 +1123,17 @@ def node_chain_copy(source):
    1080 1123
     def list_chain_copy(source):
    
    1081 1124
         copy = []
    
    1082 1125
         for item in source:
    
    1083
    -        if isinstance(item, collections.abc.Mapping):
    
    1126
    +        item_type = type(item)
    
    1127
    +        if item_type in __dict_types:
    
    1084 1128
                 copy.append(node_chain_copy(item))
    
    1085
    -        elif isinstance(item, list):
    
    1129
    +        elif item_type in __list_types:
    
    1086 1130
                 copy.append(list_chain_copy(item))
    
    1087
    -        elif isinstance(item, Provenance):
    
    1131
    +        elif item_type in __provenance_types:
    
    1088 1132
                 copy.append(item.clone())
    
    1089
    -        else:
    
    1133
    +        elif item_type in __quick_types:
    
    1090 1134
                 copy.append(item)
    
    1135
    +        else:  # Fallback
    
    1136
    +            raise ValueError("Unable to be quick about list_chain_copy of {}".format(item_type))
    
    1091 1137
     
    
    1092 1138
         return copy
    
    1093 1139
     
    
    ... ... @@ -1095,14 +1141,17 @@ def list_chain_copy(source):
    1095 1141
     def node_copy(source):
    
    1096 1142
         copy = {}
    
    1097 1143
         for key, value in source.items():
    
    1098
    -        if isinstance(value, collections.abc.Mapping):
    
    1144
    +        value_type = type(value)
    
    1145
    +        if value_type in __dict_types:
    
    1099 1146
                 copy[key] = node_copy(value)
    
    1100
    -        elif isinstance(value, list):
    
    1147
    +        elif value_type in __list_types:
    
    1101 1148
                 copy[key] = list_copy(value)
    
    1102
    -        elif isinstance(value, Provenance):
    
    1149
    +        elif value_type in __provenance_types:
    
    1103 1150
                 copy[key] = value.clone()
    
    1104
    -        else:
    
    1151
    +        elif value_type in __quick_types:
    
    1105 1152
                 copy[key] = value
    
    1153
    +        else:
    
    1154
    +            raise ValueError("Unable to be quick about node_copy of {}".format(value_type))
    
    1106 1155
     
    
    1107 1156
         ensure_provenance(copy)
    
    1108 1157
     
    
    ... ... @@ -1112,14 +1161,17 @@ def node_copy(source):
    1112 1161
     def list_copy(source):
    
    1113 1162
         copy = []
    
    1114 1163
         for item in source:
    
    1115
    -        if isinstance(item, collections.abc.Mapping):
    
    1164
    +        item_type = type(item)
    
    1165
    +        if item_type in __dict_types:
    
    1116 1166
                 copy.append(node_copy(item))
    
    1117
    -        elif isinstance(item, list):
    
    1167
    +        elif item_type in __list_types:
    
    1118 1168
                 copy.append(list_copy(item))
    
    1119
    -        elif isinstance(item, Provenance):
    
    1169
    +        elif item_type in __provenance_types:
    
    1120 1170
                 copy.append(item.clone())
    
    1121
    -        else:
    
    1171
    +        elif item_type in __quick_types:
    
    1122 1172
                 copy.append(item)
    
    1173
    +        else:
    
    1174
    +            raise ValueError("Unable to be quick about list_copy of {}".format(item_type))
    
    1123 1175
     
    
    1124 1176
         return copy
    
    1125 1177
     
    

  • buildstream/element.py
    ... ... @@ -2108,11 +2108,14 @@ class Element(Plugin):
    2108 2108
                 }
    
    2109 2109
     
    
    2110 2110
                 self.__cache_key_dict['fatal-warnings'] = sorted(project._fatal_warnings)
    
    2111
    +            self.__cache_key_dict['dependencies'] = []
    
    2112
    +            self.__cache_key_dict = _yaml.node_sanitize(self.__cache_key_dict)
    
    2111 2113
     
    
    2112
    -        cache_key_dict = self.__cache_key_dict.copy()
    
    2113
    -        cache_key_dict['dependencies'] = dependencies
    
    2114
    +        # This replacement is safe since OrderedDict replaces the value,
    
    2115
    +        # leaving its location in the dictionary alone.
    
    2116
    +        self.__cache_key_dict['dependencies'] = _yaml.node_sanitize(dependencies)
    
    2114 2117
     
    
    2115
    -        return _cachekey.generate_key(cache_key_dict)
    
    2118
    +        return _cachekey.generate_key_pre_sanitized(self.__cache_key_dict)
    
    2116 2119
     
    
    2117 2120
         # __can_build_incrementally()
    
    2118 2121
         #
    

  • requirements/requirements.in
    ... ... @@ -13,6 +13,4 @@ psutil
    13 13
     # See issues #571 and #790.
    
    14 14
     ruamel.yaml >= 0.15.41, < 0.15.52
    
    15 15
     setuptools
    
    16
    -# (Potentially) short-term need for roaring bitmaps for the
    
    17
    -# loader dependency sorting
    
    18
    -roaringbitmap
    16
    +pyroaring

  • requirements/requirements.txt
    ... ... @@ -13,9 +13,7 @@ psutil==5.4.8
    13 13
     # See issues #571 and #790.
    
    14 14
     ruamel.yaml==0.15.51
    
    15 15
     setuptools==39.0.1
    
    16
    -# (Potentially) short-term need for roaring bitmaps for the
    
    17
    -# loader dependency sorting
    
    18
    -roaringbitmap==0.6
    
    16
    +pyroaring==0.2.6
    
    19 17
     ## The following requirements were added by pip freeze:
    
    20 18
     MarkupSafe==1.1.0
    
    21 19
     six==1.12.0

  • tests/integration/autotools.py
    ... ... @@ -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'
    

  • tests/integration/build-tree.py
    ... ... @@ -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'
    

  • tests/integration/build-uid.py
    ... ... @@ -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')
    

  • tests/integration/cachedfail.py
    ... ... @@ -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):
    

  • tests/integration/cmake.py
    ... ... @@ -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'
    

  • tests/integration/compose.py
    ... ... @@ -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)
    

  • tests/integration/make.py
    ... ... @@ -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'
    

  • tests/integration/manual.py
    ... ... @@ -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')
    

  • tests/integration/messages.py
    ... ... @@ -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')
    

  • tests/integration/pip_element.py
    ... ... @@ -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)
    

  • tests/integration/pip_source.py
    ... ... @@ -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')
    

  • tests/integration/pullbuildtrees.py
    ... ... @@ -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'
    

  • tests/integration/script.py
    ... ... @@ -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')
    

  • tests/integration/shell.py
    ... ... @@ -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)
    

  • tests/integration/sockets.py
    ... ... @@ -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'
    

  • tests/integration/source-determinism.py
    ... ... @@ -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
         """
    

  • tests/integration/stack.py
    ... ... @@ -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')
    

  • tests/integration/symlinks.py
    ... ... @@ -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')
    

  • tests/integration/workspace.py
    ... ... @@ -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')
    

  • tests/testutils/filetypegenerator.py
    ... ... @@ -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()

  • tests/testutils/site.py
    ... ... @@ -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()



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]