diff options
Diffstat (limited to '')
-rw-r--r-- | debian/patches/deb-testing.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/debian/patches/deb-testing.patch b/debian/patches/deb-testing.patch new file mode 100644 index 0000000..7556c4f --- /dev/null +++ b/debian/patches/deb-testing.patch @@ -0,0 +1,51 @@ +Author: Michael R. Crusoe <crusoe@debian.org> +Description: Debian-specific changes for running the tests offline during the build +Forwarded: not-needed +--- ansible-lint.orig/conftest.py ++++ ansible-lint/conftest.py +@@ -15,7 +15,7 @@ + + # checking if user is running pytest without installing test dependencies: + missing = [] +-for module in ["ansible", "black", "mypy", "pylint"]: ++for module in ["ansible", "black"]: + if not importlib.util.find_spec(module): + missing.append(module) + if missing: +@@ -30,18 +30,6 @@ + """Ensure we run preparation only on master thread when running in parallel.""" + if is_help_option_present(config): + return +- if is_master(config): +- # we need to be sure that we have the requirements installed as some tests +- # might depend on these. This approach is compatible with GHA caching. +- try: +- subprocess.check_output( +- ["./tools/install-reqs.sh"], # noqa: S603 +- stderr=subprocess.PIPE, +- text=True, +- ) +- except subprocess.CalledProcessError as exc: +- print(f"{exc}\n{exc.stderr}\n{exc.stdout}", file=sys.stderr) # noqa: T201 +- sys.exit(1) + + + def is_help_option_present(config: pytest.Config) -> bool: +--- ansible-lint.orig/test/test_schemas.py ++++ ansible-lint/test/test_schemas.py +@@ -10,7 +10,6 @@ + from unittest.mock import DEFAULT, MagicMock, patch + + import pytest +-import spdx.config + + from ansiblelint.file_utils import Lintable + from ansiblelint.schemas import __file__ as schema_module +@@ -18,7 +17,6 @@ + from ansiblelint.schemas.main import validate_file_schema + + schema_path = Path(schema_module).parent +-spdx_config_path = Path(spdx.config.__file__).parent + + + def test_refresh_schemas() -> None: |