Sfoglia il codice sorgente

Pass --dds-exe through to mkrepo in tests

default_compile_flags
vector-of-bool 4 anni fa
parent
commit
eb0b8ec9a8
2 ha cambiato i file con 8 aggiunte e 4 eliminazioni
  1. +7
    -4
      tests/conftest.py
  2. +1
    -0
      tests/http.py

+ 7
- 4
tests/conftest.py Vedi File

@@ -11,8 +11,8 @@ from .http import * # Exposes the HTTP fixtures


@pytest.fixture(scope='session')
def dds_exe() -> Path:
return Path(__file__).absolute().parent.parent / '_build/dds'
def dds_exe(pytestconfig) -> Path:
return Path(pytestconfig.getoption('--dds-exe'))


@pytest.yield_fixture(scope='session')
@@ -54,8 +54,11 @@ def scope():


def pytest_addoption(parser):
parser.addoption(
'--test-deps', action='store_true', default=False, help='Run the exhaustive and intensive dds-deps tests')
parser.addoption('--test-deps',
action='store_true',
default=False,
help='Run the exhaustive and intensive dds-deps tests')
parser.addoption('--dds-exe', help='Path to the dds executable under test', required=True, type=Path)


def pytest_configure(config):

+ 1
- 0
tests/http.py Vedi File

@@ -92,6 +92,7 @@ class RepoFixture:
subprocess.check_call([
sys.executable,
str(Path.cwd() / 'tools/mkrepo.py'),
f'--dds-exe={self.dds_exe}',
f'--dir={self.server.root}',
f'--spec={fpath}',
])

Loading…
Annulla
Salva