Only run the very slow new integration test in one CI job

This commit is contained in:
Jean-Paul Calderone 2023-01-17 09:27:17 -05:00
parent 3ab7fc3853
commit 5424aa9737
3 changed files with 32 additions and 0 deletions

View File

@ -94,6 +94,8 @@ workflows:
{}
- "integration":
# Run even the slow integration tests here.
tox-args: "--runslow"
requires:
# If the unit test suite doesn't pass, don't bother running the
# integration tests.
@ -294,6 +296,14 @@ jobs:
integration:
<<: *DEBIAN
parameters:
tox-args:
description: >-
Additional arguments to pass to the tox command.
type: string"
default: ""
docker:
- <<: *DOCKERHUB_AUTH
image: "tahoelafsci/debian:11-py3.9"
@ -306,6 +316,11 @@ jobs:
# Disable artifact collection because py.test can't produce any.
ARTIFACTS_OUTPUT_PATH: ""
# Pass on anything we got in our parameters. Passing an arguments here
# disables the default "integration" argument defined in the tox env, so
# also stick "integration" in here.
TAHOE_LAFS_TOX_ARGS: "<< parameters.tox-args >> integration"
steps:
- "checkout"
# DRY, YAML-style. See the debian-9 steps.

View File

@ -62,6 +62,22 @@ def pytest_addoption(parser):
help=("If set, force Foolscap only for the storage protocol. " +
"Otherwise HTTP will be used.")
)
parser.addoption(
"--runslow", action="store_true", default=False,
dest="runslow",
help="If set, run tests marked as slow.",
)
def pytest_collection_modifyitems(session, config, items):
if not config.option.runslow:
# The --runslow option was not given; keep only collected items not
# marked as slow.
items[:] = [
item
for item
in items
if item.get_closest_marker("slow") is None
]
@pytest.fixture(autouse=True, scope='session')

View File

@ -95,6 +95,7 @@ def test_convergence(convergence):
assert len(convergence) == 16, "Convergence secret must by 16 bytes"
@mark.slow
@mark.parametrize('case_and_expected', vectors.capabilities.items())
@ensureDeferred
async def test_capability(reactor, request, alice, case_and_expected):