Benjamin Schubert pushed to branch bschubert/add-fedora-nobwrap-tests at BuildStream / buildstream
Commits:
-
99d04dc4
by Benjamin Schubert at 2018-11-12T10:53:18Z
6 changed files:
- tests/examples/integration-commands.py
- tests/examples/junctions.py
- tests/examples/running-commands.py
- tests/integration/autotools.py
- tests/integration/build-tree.py
- tests/integration/build-uid.py
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 IS_LINUX
|
|
6 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -12,7 +12,7 @@ DATA_DIR = os.path.join( |
12 | 12 |
)
|
13 | 13 |
|
14 | 14 |
|
15 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
15 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
16 | 16 |
@pytest.mark.datafiles(DATA_DIR)
|
17 | 17 |
def test_integration_commands_build(cli, tmpdir, datafiles):
|
18 | 18 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -3,7 +3,7 @@ import pytest |
3 | 3 |
|
4 | 4 |
from tests.testutils import cli_integration as cli
|
5 | 5 |
from tests.testutils.integration import assert_contains
|
6 |
-from tests.testutils.site import IS_LINUX
|
|
6 |
+from tests.testutils.site import IS_LINUX, HAVE_BWRAP
|
|
7 | 7 |
|
8 | 8 |
pytestmark = pytest.mark.integration
|
9 | 9 |
|
... | ... | @@ -13,7 +13,7 @@ DATA_DIR = os.path.join( |
13 | 13 |
|
14 | 14 |
|
15 | 15 |
# Test that the project builds successfully
|
16 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
16 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
17 | 17 |
@pytest.mark.datafiles(DATA_DIR)
|
18 | 18 |
def test_build(cli, tmpdir, datafiles):
|
19 | 19 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -23,7 +23,7 @@ def test_build(cli, tmpdir, datafiles): |
23 | 23 |
|
24 | 24 |
|
25 | 25 |
# Test the callHello script works as expected.
|
26 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
26 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
27 | 27 |
@pytest.mark.datafiles(DATA_DIR)
|
28 | 28 |
def test_shell_call_hello(cli, tmpdir, datafiles):
|
29 | 29 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -3,7 +3,7 @@ import pytest |
3 | 3 |
|
4 | 4 |
from tests.testutils import cli_integration as cli
|
5 | 5 |
from tests.testutils.integration import assert_contains
|
6 |
-from tests.testutils.site import IS_LINUX
|
|
6 |
+from tests.testutils.site import IS_LINUX, HAVE_BWRAP
|
|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -12,7 +12,7 @@ DATA_DIR = os.path.join( |
12 | 12 |
)
|
13 | 13 |
|
14 | 14 |
|
15 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
15 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
16 | 16 |
@pytest.mark.datafiles(DATA_DIR)
|
17 | 17 |
def test_running_commands_build(cli, tmpdir, datafiles):
|
18 | 18 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -23,7 +23,7 @@ def test_running_commands_build(cli, tmpdir, datafiles): |
23 | 23 |
|
24 | 24 |
|
25 | 25 |
# Test running the executable
|
26 |
-@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
|
|
26 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
27 | 27 |
@pytest.mark.datafiles(DATA_DIR)
|
28 | 28 |
def test_running_commands_run(cli, tmpdir, datafiles):
|
29 | 29 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -3,6 +3,7 @@ import pytest |
3 | 3 |
|
4 | 4 |
from tests.testutils import cli_integration as cli
|
5 | 5 |
from tests.testutils.integration import assert_contains
|
6 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
6 | 7 |
|
7 | 8 |
|
8 | 9 |
pytestmark = pytest.mark.integration
|
... | ... | @@ -18,6 +19,7 @@ DATA_DIR = os.path.join( |
18 | 19 |
# amhello project for this.
|
19 | 20 |
@pytest.mark.integration
|
20 | 21 |
@pytest.mark.datafiles(DATA_DIR)
|
22 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
21 | 23 |
def test_autotools_build(cli, tmpdir, datafiles):
|
22 | 24 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
23 | 25 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -42,6 +44,7 @@ def test_autotools_build(cli, tmpdir, datafiles): |
42 | 44 |
# amhello project for this.
|
43 | 45 |
@pytest.mark.integration
|
44 | 46 |
@pytest.mark.datafiles(DATA_DIR)
|
47 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
45 | 48 |
def test_autotools_confroot_build(cli, tmpdir, datafiles):
|
46 | 49 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
47 | 50 |
checkout = os.path.join(cli.directory, 'checkout')
|
... | ... | @@ -64,6 +67,7 @@ def test_autotools_confroot_build(cli, tmpdir, datafiles): |
64 | 67 |
|
65 | 68 |
# Test running an executable built with autotools
|
66 | 69 |
@pytest.mark.datafiles(DATA_DIR)
|
70 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
67 | 71 |
def test_autotools_run(cli, tmpdir, datafiles):
|
68 | 72 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
69 | 73 |
element_name = 'autotools/amhello.bst'
|
... | ... | @@ -3,6 +3,7 @@ import pytest |
3 | 3 |
import shutil
|
4 | 4 |
|
5 | 5 |
from tests.testutils import cli, cli_integration, create_artifact_share
|
6 |
+from tests.testutils.site import HAVE_BWRAP, IS_LINUX
|
|
6 | 7 |
from buildstream._exceptions import ErrorDomain
|
7 | 8 |
|
8 | 9 |
|
... | ... | @@ -16,6 +17,7 @@ DATA_DIR = os.path.join( |
16 | 17 |
|
17 | 18 |
|
18 | 19 |
@pytest.mark.datafiles(DATA_DIR)
|
20 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
19 | 21 |
def test_buildtree_staged(cli_integration, tmpdir, datafiles):
|
20 | 22 |
# i.e. tests that cached build trees are staged by `bst shell --build`
|
21 | 23 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -31,6 +33,7 @@ def test_buildtree_staged(cli_integration, tmpdir, datafiles): |
31 | 33 |
|
32 | 34 |
|
33 | 35 |
@pytest.mark.datafiles(DATA_DIR)
|
36 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
34 | 37 |
def test_buildtree_from_failure(cli_integration, tmpdir, datafiles):
|
35 | 38 |
# i.e. test that on a build failure, we can still shell into it
|
36 | 39 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -50,6 +53,7 @@ def test_buildtree_from_failure(cli_integration, tmpdir, datafiles): |
50 | 53 |
# Check that build shells work when pulled from a remote cache
|
51 | 54 |
# This is to roughly simulate remote execution
|
52 | 55 |
@pytest.mark.datafiles(DATA_DIR)
|
56 |
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
|
|
53 | 57 |
def test_buildtree_pulled(cli, tmpdir, datafiles):
|
54 | 58 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
55 | 59 |
element_name = 'build-shell/buildtree.bst'
|
... | ... | @@ -16,7 +16,7 @@ DATA_DIR = os.path.join( |
16 | 16 |
)
|
17 | 17 |
|
18 | 18 |
|
19 |
-@pytest.mark.skipif(not IS_LINUX and not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
19 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
|
|
20 | 20 |
@pytest.mark.datafiles(DATA_DIR)
|
21 | 21 |
def test_build_uid_overridden(cli, tmpdir, datafiles):
|
22 | 22 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|
... | ... | @@ -35,7 +35,7 @@ def test_build_uid_overridden(cli, tmpdir, datafiles): |
35 | 35 |
assert result.exit_code == 0
|
36 | 36 |
|
37 | 37 |
|
38 |
-@pytest.mark.skipif(not IS_LINUX and not HAVE_BWRAP, reason='Only available on linux with bubbelwrap')
|
|
38 |
+@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubbelwrap')
|
|
39 | 39 |
@pytest.mark.datafiles(DATA_DIR)
|
40 | 40 |
def test_build_uid_in_project(cli, tmpdir, datafiles):
|
41 | 41 |
project = os.path.join(datafiles.dirname, datafiles.basename)
|