[Notes] [Git][BuildStream/buildstream][bschubert/add-fedora-nobwrap-tests] fixup! gitlab-ci.yml: Add linux without brwap/ostree to ensure tests behave



Title: GitLab

Benjamin Schubert pushed to branch bschubert/add-fedora-nobwrap-tests at BuildStream / buildstream

Commits:

2 changed files:

Changes:

  • tests/integration/shell.py
    ... ... @@ -5,6 +5,7 @@ from buildstream import _yaml
    5 5
     from buildstream._exceptions import ErrorDomain
    
    6 6
     
    
    7 7
     from tests.testutils import cli_integration as cli
    
    8
    +from tests.testutils.site import HAVE_BWRAP, IS_LINUX
    
    8 9
     
    
    9 10
     
    
    10 11
     pytestmark = pytest.mark.integration
    
    ... ... @@ -127,6 +128,7 @@ def test_env_assign_isolated(cli, tmpdir, datafiles, animal):
    127 128
     # Test running an executable in a runtime with no shell (i.e., no
    
    128 129
     # /bin/sh)
    
    129 130
     @pytest.mark.datafiles(DATA_DIR)
    
    131
    +@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
    
    130 132
     def test_no_shell(cli, tmpdir, datafiles):
    
    131 133
         project = os.path.join(datafiles.dirname, datafiles.basename)
    
    132 134
         element_path = os.path.join(project, 'elements')
    
    ... ... @@ -159,6 +161,7 @@ def test_no_shell(cli, tmpdir, datafiles):
    159 161
     # Test that bind mounts defined in project.conf work
    
    160 162
     @pytest.mark.parametrize("path", [("/etc/pony.conf"), ("/usr/share/pony/pony.txt")])
    
    161 163
     @pytest.mark.datafiles(DATA_DIR)
    
    164
    +@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
    
    162 165
     def test_host_files(cli, tmpdir, datafiles, path):
    
    163 166
         project = os.path.join(datafiles.dirname, datafiles.basename)
    
    164 167
         ponyfile = os.path.join(project, 'files', 'shell-mount', 'pony.txt')
    
    ... ... @@ -179,6 +182,7 @@ def test_host_files(cli, tmpdir, datafiles, path):
    179 182
     # Test that bind mounts defined in project.conf work
    
    180 183
     @pytest.mark.parametrize("path", [("/etc"), ("/usr/share/pony")])
    
    181 184
     @pytest.mark.datafiles(DATA_DIR)
    
    185
    +@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
    
    182 186
     def test_host_files_expand_environ(cli, tmpdir, datafiles, path):
    
    183 187
         project = os.path.join(datafiles.dirname, datafiles.basename)
    
    184 188
         hostpath = os.path.join(project, 'files', 'shell-mount')
    
    ... ... @@ -224,6 +228,7 @@ def test_isolated_no_mount(cli, tmpdir, datafiles, path):
    224 228
     # declared as optional, and that there is no warning if it is optional
    
    225 229
     @pytest.mark.parametrize("optional", [("mandatory"), ("optional")])
    
    226 230
     @pytest.mark.datafiles(DATA_DIR)
    
    231
    +@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
    
    227 232
     def test_host_files_missing(cli, tmpdir, datafiles, optional):
    
    228 233
         project = os.path.join(datafiles.dirname, datafiles.basename)
    
    229 234
         ponyfile = os.path.join(project, 'files', 'shell-mount', 'horsy.txt')
    
    ... ... @@ -259,6 +264,7 @@ def test_host_files_missing(cli, tmpdir, datafiles, optional):
    259 264
     # Test that bind mounts defined in project.conf work
    
    260 265
     @pytest.mark.parametrize("path", [("/etc/pony.conf"), ("/usr/share/pony/pony.txt")])
    
    261 266
     @pytest.mark.datafiles(DATA_DIR)
    
    267
    +@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
    
    262 268
     def test_cli_mount(cli, tmpdir, datafiles, path):
    
    263 269
         project = os.path.join(datafiles.dirname, datafiles.basename)
    
    264 270
         ponyfile = os.path.join(project, 'files', 'shell-mount', 'pony.txt')
    
    ... ... @@ -271,6 +277,7 @@ def test_cli_mount(cli, tmpdir, datafiles, path):
    271 277
     # Test that we can see the workspace files in a shell
    
    272 278
     @pytest.mark.integration
    
    273 279
     @pytest.mark.datafiles(DATA_DIR)
    
    280
    +@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
    
    274 281
     def test_workspace_visible(cli, tmpdir, datafiles):
    
    275 282
         project = os.path.join(datafiles.dirname, datafiles.basename)
    
    276 283
         workspace = os.path.join(cli.directory, 'workspace')
    
    ... ... @@ -304,6 +311,7 @@ def test_workspace_visible(cli, tmpdir, datafiles):
    304 311
     
    
    305 312
     # Test that '--sysroot' works
    
    306 313
     @pytest.mark.datafiles(DATA_DIR)
    
    314
    +@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
    
    307 315
     def test_sysroot(cli, tmpdir, datafiles):
    
    308 316
         project = os.path.join(datafiles.dirname, datafiles.basename)
    
    309 317
         base_element = "base/base-alpine.bst"
    
    ... ... @@ -333,6 +341,7 @@ def test_sysroot(cli, tmpdir, datafiles):
    333 341
     
    
    334 342
     # Test system integration commands can access devices in /dev
    
    335 343
     @pytest.mark.datafiles(DATA_DIR)
    
    344
    +@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
    
    336 345
     def test_integration_devices(cli, tmpdir, datafiles):
    
    337 346
         project = os.path.join(datafiles.dirname, datafiles.basename)
    
    338 347
         element_name = 'integration.bst'
    

  • tests/integration/sockets.py
    ... ... @@ -5,6 +5,7 @@ from buildstream import _yaml
    5 5
     
    
    6 6
     from tests.testutils import cli_integration as cli
    
    7 7
     from tests.testutils.integration import assert_contains
    
    8
    +from tests.testutils.site import HAVE_BWRAP, IS_LINUX
    
    8 9
     
    
    9 10
     
    
    10 11
     pytestmark = pytest.mark.integration
    
    ... ... @@ -16,6 +17,7 @@ DATA_DIR = os.path.join(
    16 17
     
    
    17 18
     
    
    18 19
     @pytest.mark.datafiles(DATA_DIR)
    
    20
    +@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
    
    19 21
     def test_builddir_socket_ignored(cli, tmpdir, datafiles):
    
    20 22
         project = os.path.join(datafiles.dirname, datafiles.basename)
    
    21 23
         element_name = 'sockets/make-builddir-socket.bst'
    
    ... ... @@ -25,6 +27,7 @@ def test_builddir_socket_ignored(cli, tmpdir, datafiles):
    25 27
     
    
    26 28
     
    
    27 29
     @pytest.mark.datafiles(DATA_DIR)
    
    30
    +@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
    
    28 31
     def test_install_root_socket_ignored(cli, tmpdir, datafiles):
    
    29 32
         project = os.path.join(datafiles.dirname, datafiles.basename)
    
    30 33
         element_name = 'sockets/make-install-root-socket.bst'
    



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