diff options
author | Phillip Smyth <phillip.smyth@codethink.co.uk> | 2018-08-20 13:58:00 +0100 |
---|---|---|
committer | Phillip Smyth <phillip.smyth@codethink.co.uk> | 2018-08-20 13:58:00 +0100 |
commit | 1ac64da2f604b4330e818043d829e8791f1e5dba (patch) | |
tree | 4e5eaa84825a84f9af8468accab01786584d6f9d | |
parent | 5a66710733fcb0d3e24da9ba935de56b79bdb4c5 (diff) | |
download | buildstream-no_fuse_flag.tar.gz |
Added NO_FUSE flag to tests that need fuseno_fuse_flag
65 files changed, 169 insertions, 39 deletions
diff --git a/tests/artifactcache/expiry.py b/tests/artifactcache/expiry.py index 9c74eb1c4..1b1f673b6 100644 --- a/tests/artifactcache/expiry.py +++ b/tests/artifactcache/expiry.py @@ -6,6 +6,7 @@ from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils import cli, create_element_size +from tests.testutils.site import IS_LINUX, NO_FUSE DATA_DIR = os.path.join( @@ -16,6 +17,7 @@ DATA_DIR = os.path.join( # Ensure that the cache successfully removes an old artifact if we do # not have enough space left. +@pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') @pytest.mark.datafiles(DATA_DIR) def test_artifact_expires(cli, datafiles, tmpdir): project = os.path.join(datafiles.dirname, datafiles.basename) @@ -52,6 +54,7 @@ def test_artifact_expires(cli, datafiles, tmpdir): # Ensure that we don't end up deleting the whole cache (or worse) if # we try to store an artifact that is too large to fit in the quota. +@pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') @pytest.mark.parametrize('size', [ # Test an artifact that is obviously too large (500000), @@ -76,6 +79,7 @@ def test_artifact_too_large(cli, datafiles, tmpdir, size): res.assert_main_error(ErrorDomain.STREAM, None) +@pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') @pytest.mark.datafiles(DATA_DIR) def test_expiry_order(cli, datafiles, tmpdir): project = os.path.join(datafiles.dirname, datafiles.basename) @@ -130,6 +134,7 @@ def test_expiry_order(cli, datafiles, tmpdir): # Ensure that we don't accidentally remove an artifact from something # in the current build pipeline, because that would be embarassing, # wouldn't it? +@pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') @pytest.mark.datafiles(DATA_DIR) def test_keep_dependencies(cli, datafiles, tmpdir): project = os.path.join(datafiles.dirname, datafiles.basename) @@ -175,6 +180,7 @@ def test_keep_dependencies(cli, datafiles, tmpdir): # Assert that we never delete a dependency required for a build tree +@pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') @pytest.mark.datafiles(DATA_DIR) def test_never_delete_dependencies(cli, datafiles, tmpdir): project = os.path.join(datafiles.dirname, datafiles.basename) @@ -221,6 +227,7 @@ def test_never_delete_dependencies(cli, datafiles, tmpdir): # Ensure that only valid cache quotas make it through the loading # process. +@pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') @pytest.mark.parametrize("quota,success", [ ("1", True), ("1K", True), diff --git a/tests/artifactcache/junctions.py b/tests/artifactcache/junctions.py index 378d007a0..1a942b9fe 100644 --- a/tests/artifactcache/junctions.py +++ b/tests/artifactcache/junctions.py @@ -2,6 +2,7 @@ import os import shutil import pytest from tests.testutils import cli, create_artifact_share +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream import _yaml @@ -36,6 +37,7 @@ def project_set_artifacts(project, url): _yaml.dump(_yaml.node_sanitize(project_config), filename=project_conf_file) +@pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') @pytest.mark.datafiles(DATA_DIR) def test_push_pull(cli, tmpdir, datafiles): project = os.path.join(str(datafiles), 'foo') diff --git a/tests/examples/autotools.py b/tests/examples/autotools.py index c774776fb..2ecdc69f5 100644 --- a/tests/examples/autotools.py +++ b/tests/examples/autotools.py @@ -3,9 +3,11 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains -from tests.testutils.site import IS_LINUX +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), '..', '..', 'doc', 'examples', 'autotools' diff --git a/tests/examples/developing.py b/tests/examples/developing.py index 4c488d962..d73379d14 100644 --- a/tests/examples/developing.py +++ b/tests/examples/developing.py @@ -4,9 +4,10 @@ import pytest import tests.testutils.patch as patch from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains -from tests.testutils.site import IS_LINUX +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), '..', '..', 'doc', 'examples', 'developing' diff --git a/tests/examples/first-project.py b/tests/examples/first-project.py index dac181423..33d51552f 100644 --- a/tests/examples/first-project.py +++ b/tests/examples/first-project.py @@ -3,10 +3,10 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains -from tests.testutils.site import IS_LINUX - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/examples/flatpak-autotools.py b/tests/examples/flatpak-autotools.py index 3965725c7..cc5a7838c 100644 --- a/tests/examples/flatpak-autotools.py +++ b/tests/examples/flatpak-autotools.py @@ -3,10 +3,11 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains -from tests.testutils.site import IS_LINUX +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/examples/integration-commands.py b/tests/examples/integration-commands.py index 32ef763eb..626f2e7d0 100644 --- a/tests/examples/integration-commands.py +++ b/tests/examples/integration-commands.py @@ -3,10 +3,11 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains -from tests.testutils.site import IS_LINUX - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), '..', '..', 'doc', 'examples', 'integration-commands' ) diff --git a/tests/examples/junctions.py b/tests/examples/junctions.py index d2a653884..af708df98 100644 --- a/tests/examples/junctions.py +++ b/tests/examples/junctions.py @@ -3,9 +3,10 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains -from tests.testutils.site import IS_LINUX +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), '..', '..', 'doc', 'examples', 'junctions' diff --git a/tests/examples/running-commands.py b/tests/examples/running-commands.py index 95f645d77..683981425 100644 --- a/tests/examples/running-commands.py +++ b/tests/examples/running-commands.py @@ -3,10 +3,11 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains -from tests.testutils.site import IS_LINUX - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), '..', '..', 'doc', 'examples', 'running-commands' ) diff --git a/tests/format/assertion.py b/tests/format/assertion.py index 42f69b759..64eef1e83 100644 --- a/tests/format/assertion.py +++ b/tests/format/assertion.py @@ -2,6 +2,9 @@ import os import pytest from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.join( diff --git a/tests/format/include.py b/tests/format/include.py index 36e723ed0..0c01e6a73 100644 --- a/tests/format/include.py +++ b/tests/format/include.py @@ -3,6 +3,9 @@ import pytest from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils import cli, generate_junction, create_repo +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory diff --git a/tests/format/listdirectiveerrors.py b/tests/format/listdirectiveerrors.py index 4a2de86fc..869093223 100644 --- a/tests/format/listdirectiveerrors.py +++ b/tests/format/listdirectiveerrors.py @@ -2,6 +2,9 @@ import os import pytest from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.dirname(os.path.realpath(__file__)) diff --git a/tests/format/optionarch.py b/tests/format/optionarch.py index 4c126aa87..f2a5df657 100644 --- a/tests/format/optionarch.py +++ b/tests/format/optionarch.py @@ -4,6 +4,9 @@ from contextlib import contextmanager from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.dirname(os.path.realpath(__file__)) diff --git a/tests/format/optionbool.py b/tests/format/optionbool.py index f02f0eee3..18eb7871f 100644 --- a/tests/format/optionbool.py +++ b/tests/format/optionbool.py @@ -3,6 +3,9 @@ import pytest from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.dirname(os.path.realpath(__file__)) diff --git a/tests/format/optioneltmask.py b/tests/format/optioneltmask.py index b49eee88a..271902eef 100644 --- a/tests/format/optioneltmask.py +++ b/tests/format/optioneltmask.py @@ -3,6 +3,9 @@ import pytest from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.dirname(os.path.realpath(__file__)) diff --git a/tests/format/optionenum.py b/tests/format/optionenum.py index 6990ad915..b63fba176 100644 --- a/tests/format/optionenum.py +++ b/tests/format/optionenum.py @@ -3,6 +3,9 @@ import pytest from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.dirname(os.path.realpath(__file__)) diff --git a/tests/format/optionexports.py b/tests/format/optionexports.py index 26eadc677..43ed1d7c6 100644 --- a/tests/format/optionexports.py +++ b/tests/format/optionexports.py @@ -2,6 +2,9 @@ import os import pytest from buildstream import _yaml from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.dirname(os.path.realpath(__file__)) diff --git a/tests/format/optionflags.py b/tests/format/optionflags.py index 3585f5ea5..82f974d07 100644 --- a/tests/format/optionflags.py +++ b/tests/format/optionflags.py @@ -3,6 +3,9 @@ import pytest from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.dirname(os.path.realpath(__file__)) diff --git a/tests/format/options.py b/tests/format/options.py index 2076106cb..88a14b32d 100644 --- a/tests/format/options.py +++ b/tests/format/options.py @@ -3,6 +3,9 @@ import pytest from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.join( diff --git a/tests/format/project.py b/tests/format/project.py index df1a2364b..aa9404c93 100644 --- a/tests/format/project.py +++ b/tests/format/project.py @@ -3,6 +3,9 @@ import pytest from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils import cli, filetypegenerator +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory diff --git a/tests/format/projectoverrides.py b/tests/format/projectoverrides.py index d63b0a23d..8e5a1485f 100644 --- a/tests/format/projectoverrides.py +++ b/tests/format/projectoverrides.py @@ -3,6 +3,9 @@ import os import pytest from buildstream import _yaml from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.join( diff --git a/tests/format/variables.py b/tests/format/variables.py index d570bf01d..cbcab1158 100644 --- a/tests/format/variables.py +++ b/tests/format/variables.py @@ -3,6 +3,9 @@ import pytest from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py index d0f52d6a7..cdb27383c 100644 --- a/tests/frontend/buildcheckout.py +++ b/tests/frontend/buildcheckout.py @@ -3,12 +3,14 @@ import tarfile import hashlib import pytest from tests.testutils import cli, create_repo, ALL_REPO_KINDS, generate_junction +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from . import configure_project +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/frontend/buildtrack.py b/tests/frontend/buildtrack.py index 3f0a3adbe..72b77f0ff 100644 --- a/tests/frontend/buildtrack.py +++ b/tests/frontend/buildtrack.py @@ -5,12 +5,14 @@ import itertools import pytest from tests.testutils import cli, create_repo +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream import _yaml from buildstream._exceptions import ErrorDomain from . import configure_project +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/frontend/compose_splits.py b/tests/frontend/compose_splits.py index b5a2e760d..f2a017c07 100644 --- a/tests/frontend/compose_splits.py +++ b/tests/frontend/compose_splits.py @@ -1,6 +1,9 @@ import os import pytest from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.join( diff --git a/tests/frontend/cross_junction_workspace.py b/tests/frontend/cross_junction_workspace.py index eb2bc2eb8..35310d428 100644 --- a/tests/frontend/cross_junction_workspace.py +++ b/tests/frontend/cross_junction_workspace.py @@ -1,7 +1,11 @@ import os +import pytest from tests.testutils import cli, create_repo +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream import _yaml +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + def prepare_junction_project(cli, tmpdir): main_project = tmpdir.join("main") diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py index e896f4a67..2ebc82936 100644 --- a/tests/frontend/fetch.py +++ b/tests/frontend/fetch.py @@ -1,12 +1,15 @@ import os import pytest from tests.testutils import cli, create_repo, ALL_REPO_KINDS, generate_junction +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from . import configure_project +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + # Project directory TOP_DIR = os.path.dirname(os.path.realpath(__file__)) DATA_DIR = os.path.join(TOP_DIR, 'project') diff --git a/tests/frontend/logging.py b/tests/frontend/logging.py index 4c70895a5..9c1c45f1e 100644 --- a/tests/frontend/logging.py +++ b/tests/frontend/logging.py @@ -2,10 +2,13 @@ import os import pytest import re from tests.testutils import cli, create_repo, ALL_REPO_KINDS +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream import _yaml from buildstream._exceptions import ErrorDomain +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + # Project directory DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py index f37cc18af..ea20094a0 100644 --- a/tests/frontend/mirror.py +++ b/tests/frontend/mirror.py @@ -2,10 +2,13 @@ import os import pytest from tests.testutils import cli, create_repo, ALL_REPO_KINDS, generate_junction +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream import _yaml from buildstream._exceptions import ErrorDomain +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + # Project directory TOP_DIR = os.path.dirname(os.path.realpath(__file__)) DATA_DIR = os.path.join(TOP_DIR, 'project') diff --git a/tests/frontend/overlaps.py b/tests/frontend/overlaps.py index 36e15acd7..6a880176a 100644 --- a/tests/frontend/overlaps.py +++ b/tests/frontend/overlaps.py @@ -1,9 +1,12 @@ import os import pytest from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream._exceptions import ErrorDomain from buildstream import _yaml +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + # Project directory DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py index 9d2d5d1a2..c00e9a25c 100644 --- a/tests/frontend/pull.py +++ b/tests/frontend/pull.py @@ -2,7 +2,9 @@ import os import shutil import pytest from tests.testutils import cli, create_artifact_share, generate_junction +from tests.testutils.site import IS_LINUX, NO_FUSE +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory DATA_DIR = os.path.join( diff --git a/tests/frontend/push.py b/tests/frontend/push.py index 6ee301e6d..782133b37 100644 --- a/tests/frontend/push.py +++ b/tests/frontend/push.py @@ -4,9 +4,12 @@ import pytest from buildstream._exceptions import ErrorDomain from tests.testutils import cli, create_artifact_share, create_element_size from tests.testutils import generate_junction +from tests.testutils.site import IS_LINUX, NO_FUSE from . import configure_project +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + # Project directory DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/frontend/show.py b/tests/frontend/show.py index ac2e71407..4f003807f 100644 --- a/tests/frontend/show.py +++ b/tests/frontend/show.py @@ -4,11 +4,14 @@ import shutil import itertools import pytest from tests.testutils import cli, generate_junction +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadErrorReason from . import configure_project +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + # Project directory DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/frontend/track.py b/tests/frontend/track.py index 73b63ec4c..f619c2eb3 100644 --- a/tests/frontend/track.py +++ b/tests/frontend/track.py @@ -1,12 +1,14 @@ import os import pytest from tests.testutils import cli, create_repo, ALL_REPO_KINDS, generate_junction +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream._exceptions import ErrorDomain, LoadErrorReason from buildstream import _yaml from . import configure_project +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') # Project directory TOP_DIR = os.path.dirname(os.path.realpath(__file__)) DATA_DIR = os.path.join(TOP_DIR, 'project') diff --git a/tests/frontend/track_cross_junction.py b/tests/frontend/track_cross_junction.py index 423edbdef..5559b7c6d 100644 --- a/tests/frontend/track_cross_junction.py +++ b/tests/frontend/track_cross_junction.py @@ -1,8 +1,11 @@ import os import pytest from tests.testutils import cli, create_repo, ALL_REPO_KINDS, generate_junction +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream import _yaml +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + def generate_element(repo, element_path, dep_name=None): element = { diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py index fff9bf00a..6115b6f16 100644 --- a/tests/frontend/workspace.py +++ b/tests/frontend/workspace.py @@ -4,11 +4,13 @@ import shutil import subprocess from ruamel.yaml.comments import CommentedSet from tests.testutils import cli, create_repo, ALL_REPO_KINDS +from tests.testutils.site import IS_LINUX, NO_FUSE from buildstream import _yaml from buildstream._exceptions import ErrorDomain, LoadError, LoadErrorReason from buildstream._workspaces import BST_WORKSPACE_FORMAT_VERSION +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') repo_kinds = [(kind) for kind in ALL_REPO_KINDS] # Project directory diff --git a/tests/integration/autotools.py b/tests/integration/autotools.py index 0c9ac6cd8..31dfba556 100644 --- a/tests/integration/autotools.py +++ b/tests/integration/autotools.py @@ -3,10 +3,12 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/integration/build-uid.py b/tests/integration/build-uid.py index 689430454..3782ccc1d 100644 --- a/tests/integration/build-uid.py +++ b/tests/integration/build-uid.py @@ -5,10 +5,10 @@ from buildstream import _yaml from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains -from tests.testutils.site import IS_LINUX - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/integration/cachedfail.py b/tests/integration/cachedfail.py index f4cabb32c..093822958 100644 --- a/tests/integration/cachedfail.py +++ b/tests/integration/cachedfail.py @@ -5,11 +5,10 @@ from buildstream import _yaml from buildstream._exceptions import ErrorDomain from tests.testutils import cli_integration as cli, create_artifact_share -from tests.testutils.site import IS_LINUX - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration - +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/integration/cmake.py b/tests/integration/cmake.py index 8f017e707..e6b9095ac 100644 --- a/tests/integration/cmake.py +++ b/tests/integration/cmake.py @@ -3,10 +3,10 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration - +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/integration/compose-symlinks.py b/tests/integration/compose-symlinks.py index bf279fa6f..e6eb0c1f8 100644 --- a/tests/integration/compose-symlinks.py +++ b/tests/integration/compose-symlinks.py @@ -7,10 +7,10 @@ from buildstream import _yaml from tests.testutils import cli_integration as cli from tests.testutils.integration import walk_dir - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration - +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/integration/compose.py b/tests/integration/compose.py index 00c80d58b..488cbbe52 100644 --- a/tests/integration/compose.py +++ b/tests/integration/compose.py @@ -7,10 +7,10 @@ from buildstream import _yaml from tests.testutils import cli_integration as cli from tests.testutils.integration import walk_dir - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration - +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/integration/import.py b/tests/integration/import.py index 6925a0a47..b3a31fe2e 100644 --- a/tests/integration/import.py +++ b/tests/integration/import.py @@ -5,10 +5,10 @@ from buildstream import _yaml from tests.testutils import cli_integration as cli from tests.testutils.integration import walk_dir - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration - +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/integration/make.py b/tests/integration/make.py index 6928cfdc2..18323f40b 100644 --- a/tests/integration/make.py +++ b/tests/integration/make.py @@ -3,10 +3,10 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration - +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/integration/manual.py b/tests/integration/manual.py index e71ccdd79..d3acf7dfa 100644 --- a/tests/integration/manual.py +++ b/tests/integration/manual.py @@ -4,9 +4,10 @@ import pytest from buildstream import _yaml from tests.testutils import cli_integration as cli - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/integration/pip.py b/tests/integration/pip.py index 6c6de8bf8..c8c9e454c 100644 --- a/tests/integration/pip.py +++ b/tests/integration/pip.py @@ -6,10 +6,10 @@ from buildstream import _yaml from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration - +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/integration/sandbox-bwrap.py b/tests/integration/sandbox-bwrap.py index 7d2a18498..01c8dd669 100644 --- a/tests/integration/sandbox-bwrap.py +++ b/tests/integration/sandbox-bwrap.py @@ -4,9 +4,10 @@ import pytest from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains from tests.testutils.site import HAVE_BWRAP - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/integration/script.py b/tests/integration/script.py index 88226c0b7..3b9d80c7a 100644 --- a/tests/integration/script.py +++ b/tests/integration/script.py @@ -4,10 +4,10 @@ import pytest from buildstream import _yaml from tests.testutils import cli_integration as cli - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration - +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/integration/shell.py b/tests/integration/shell.py index 18953aa2d..f2df88508 100644 --- a/tests/integration/shell.py +++ b/tests/integration/shell.py @@ -5,9 +5,10 @@ from buildstream import _yaml from buildstream._exceptions import ErrorDomain from tests.testutils import cli_integration as cli - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/integration/source-determinism.py b/tests/integration/source-determinism.py index b60bc25f7..1bf445b24 100644 --- a/tests/integration/source-determinism.py +++ b/tests/integration/source-determinism.py @@ -3,6 +3,9 @@ import pytest from buildstream import _yaml, utils from tests.testutils import cli, create_repo, ALL_REPO_KINDS +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/integration/stack.py b/tests/integration/stack.py index 9444fbbad..fa75c1a84 100644 --- a/tests/integration/stack.py +++ b/tests/integration/stack.py @@ -4,9 +4,10 @@ import pytest from buildstream import _yaml from tests.testutils import cli_integration as cli - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/integration/symlinks.py b/tests/integration/symlinks.py index 18bd724c1..f301c1388 100644 --- a/tests/integration/symlinks.py +++ b/tests/integration/symlinks.py @@ -6,9 +6,10 @@ from buildstream import _yaml from tests.testutils import cli_integration as cli from tests.testutils.integration import assert_contains - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/integration/workspace.py b/tests/integration/workspace.py index 102d053fc..28b6f9201 100644 --- a/tests/integration/workspace.py +++ b/tests/integration/workspace.py @@ -3,11 +3,11 @@ import pytest from buildstream import _yaml from tests.testutils import cli_integration as cli -from tests.testutils.site import IS_LINUX from tests.testutils.integration import walk_dir - +from tests.testutils.site import IS_LINUX, NO_FUSE pytestmark = pytest.mark.integration +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/loader/junctions.py b/tests/loader/junctions.py index a02961fb5..2d527f909 100644 --- a/tests/loader/junctions.py +++ b/tests/loader/junctions.py @@ -6,6 +6,9 @@ from buildstream import _yaml, ElementError from buildstream._exceptions import LoadError, LoadErrorReason from tests.testutils import cli, create_repo from tests.testutils.site import HAVE_GIT +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/pipeline/load.py b/tests/pipeline/load.py index 29ceb6dde..178e827b0 100644 --- a/tests/pipeline/load.py +++ b/tests/pipeline/load.py @@ -3,6 +3,9 @@ import pytest from buildstream._exceptions import ErrorDomain from buildstream import _yaml from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/pipeline/preflight.py b/tests/pipeline/preflight.py index 4692d090e..229a688a9 100644 --- a/tests/pipeline/preflight.py +++ b/tests/pipeline/preflight.py @@ -3,6 +3,9 @@ import pytest from buildstream._exceptions import ErrorDomain from tests.testutils.runcli import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/plugins/filter.py b/tests/plugins/filter.py index 4a5ff3402..4750cfed0 100644 --- a/tests/plugins/filter.py +++ b/tests/plugins/filter.py @@ -4,6 +4,9 @@ import shutil from tests.testutils import cli, create_repo, ALL_REPO_KINDS from buildstream._exceptions import ErrorDomain from buildstream import _yaml +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), diff --git a/tests/sandboxes/missing-command.py b/tests/sandboxes/missing-command.py index 8f210bcec..cc063089d 100644 --- a/tests/sandboxes/missing-command.py +++ b/tests/sandboxes/missing-command.py @@ -4,6 +4,9 @@ import pytest from buildstream._exceptions import ErrorDomain from tests.testutils import cli +from tests.testutils.site import IS_LINUX, NO_FUSE + +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') DATA_DIR = os.path.join( diff --git a/tests/sources/git.py b/tests/sources/git.py index ef18e3ce3..f3d4d0493 100644 --- a/tests/sources/git.py +++ b/tests/sources/git.py @@ -5,13 +5,15 @@ from buildstream._exceptions import ErrorDomain from buildstream import _yaml from tests.testutils import cli, create_repo -from tests.testutils.site import HAVE_GIT +from tests.testutils.site import HAVE_GIT, IS_LINUX, NO_FUSE DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'git', ) +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + @pytest.mark.skipif(HAVE_GIT is False, reason="git is not available") @pytest.mark.datafiles(os.path.join(DATA_DIR, 'template')) diff --git a/tests/sources/local.py b/tests/sources/local.py index de12473d9..3b96a074f 100644 --- a/tests/sources/local.py +++ b/tests/sources/local.py @@ -3,11 +3,13 @@ import pytest from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils import cli, filetypegenerator +from tests.testutils.site import IS_LINUX, NO_FUSE DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'local', ) +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') @pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic')) diff --git a/tests/sources/patch.py b/tests/sources/patch.py index 39d43369d..f58f252b7 100644 --- a/tests/sources/patch.py +++ b/tests/sources/patch.py @@ -3,11 +3,13 @@ import pytest from buildstream._exceptions import ErrorDomain, LoadErrorReason from tests.testutils import cli, filetypegenerator +from tests.testutils.site import IS_LINUX, NO_FUSE DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'patch', ) +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') @pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic')) diff --git a/tests/sources/remote.py b/tests/sources/remote.py index d3968395f..d8b730119 100644 --- a/tests/sources/remote.py +++ b/tests/sources/remote.py @@ -5,11 +5,13 @@ import pytest from buildstream._exceptions import ErrorDomain from buildstream import _yaml from tests.testutils import cli +from tests.testutils.site import IS_LINUX, NO_FUSE DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'remote', ) +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') def generate_project(project_dir, tmpdir): diff --git a/tests/sources/tar.py b/tests/sources/tar.py index fb02de306..b6dbe39ea 100644 --- a/tests/sources/tar.py +++ b/tests/sources/tar.py @@ -7,13 +7,14 @@ import subprocess from buildstream._exceptions import ErrorDomain from buildstream import _yaml from tests.testutils import cli -from tests.testutils.site import HAVE_LZIP +from tests.testutils.site import HAVE_LZIP, IS_LINUX, NO_FUSE from . import list_dir_contents DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'tar', ) +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') def _assemble_tar(workingdir, srcdir, dstfile): diff --git a/tests/sources/zip.py b/tests/sources/zip.py index a168d529b..b62ca12e5 100644 --- a/tests/sources/zip.py +++ b/tests/sources/zip.py @@ -5,6 +5,7 @@ import zipfile from buildstream._exceptions import ErrorDomain from buildstream import _yaml from tests.testutils import cli +from tests.testutils.site import IS_LINUX, NO_FUSE from . import list_dir_contents DATA_DIR = os.path.join( @@ -12,6 +13,8 @@ DATA_DIR = os.path.join( 'zip', ) +pytestmark = pytest.mark.skipif(IS_LINUX and NO_FUSE, reason='FUSE not supported on this system') + def _assemble_zip(workingdir, dstfile): old_dir = os.getcwd() diff --git a/tests/testutils/site.py b/tests/testutils/site.py index 7dc01a613..7fe44c4d0 100644 --- a/tests/testutils/site.py +++ b/tests/testutils/site.py @@ -49,3 +49,4 @@ except ImportError: HAVE_ARPY = False IS_LINUX = os.getenv('BST_FORCE_BACKEND', sys.platform).startswith('linux') +NO_FUSE = not os.path.exists('/dev/fuse') |