forked from StanfordAHA/garnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conftest.py
30 lines (23 loc) · 875 Bytes
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import pytest
from magma import clear_cachedFunctions
import magma.backend.coreir_ as coreir_
from gemstone.generator import clear_generator_cache
collect_ignore = [
# TODO(rsetaluri): Remove this once it is moved to canal!
"experimental", # directory for experimental projects
"src", # pip folder that contains dependencies like magma
"parsetab.py",
"CoSA",
"tests/test_memory_core"
]
@pytest.fixture(autouse=True)
def magma_test():
clear_cachedFunctions()
coreir_.CoreIRContextSingleton().reset_instance()
clear_generator_cache()
def pytest_addoption(parser):
parser.addoption('--longrun', action='store_true', dest="longrun",
default=False, help="enable longrun decorated tests")
def pytest_configure(config):
if not config.option.longrun:
setattr(config.option, 'markexpr', 'not longrun')