mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
e0b898a6b4
* program-model/tree-sitter: refactor classes * program-model/tree-sitter: change how paths are considered This allows to parse also code in oss-fuzz (e.g. injected fuzz targets not in upstream project) * common: change name format for challenge commit * program-model/codequery: make it persistent and nice * program-model: disable janus & co for now * patcher: make use of codequery instead of just tree-sitter * program-model: add integration tests for codequery * program-model/codequery: add support for different languages * patcher: install codequery in patcher's container * ci: fix codequery install * program-model: ensure cqdb storage in /crs_scratch * program-model: ensure the cqdb storage is available only at the end
25 lines
693 B
Python
25 lines
693 B
Python
import pytest
|
|
|
|
|
|
def pytest_addoption(parser):
|
|
parser.addoption(
|
|
"--runintegration",
|
|
action="store_true",
|
|
default=False,
|
|
help="run integration tests",
|
|
)
|
|
|
|
|
|
def pytest_configure(config):
|
|
config.addinivalue_line("markers", "integration: mark test as an integration test")
|
|
|
|
|
|
def pytest_collection_modifyitems(config, items):
|
|
if config.getoption("--runintegration"):
|
|
# --runintegration given in cli: do not skip integration tests
|
|
return
|
|
skip_integration = pytest.mark.skip(reason="need --runintegration option to run")
|
|
for item in items:
|
|
if "integration" in item.keywords:
|
|
item.add_marker(skip_integration)
|