Browse Source

Pass --dds-exe through to mkrepo in tests

default_compile_flags
vector-of-bool 4 years ago
parent
commit
eb0b8ec9a8
2 changed files with 8 additions and 4 deletions
  1. +7
    -4
      tests/conftest.py
  2. +1
    -0
      tests/http.py

+ 7
- 4
tests/conftest.py View File





@pytest.fixture(scope='session') @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') @pytest.yield_fixture(scope='session')




def pytest_addoption(parser): 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): def pytest_configure(config):

+ 1
- 0
tests/http.py View File

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

Loading…
Cancel
Save