Skip to content
Snippets Groups Projects
Commit 9bfd88f9 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

omit coverage check in CPU testsuite

parent 6ea1c7b1
No related branches found
No related tags found
1 merge request!172Changes for compatibility with pystencils 2.0
Pipeline #77933 failed
...@@ -95,31 +95,37 @@ def typecheck(session: nox.Session): ...@@ -95,31 +95,37 @@ def typecheck(session: nox.Session):
session.run("mypy", "src/lbmpy") session.run("mypy", "src/lbmpy")
def run_testsuite(session: nox.Session): def run_testsuite(session: nox.Session, coverage: bool = True):
num_cores = os.cpu_count() num_cores = os.cpu_count()
session.run( args = [
"pytest", "pytest",
"-v", "-v",
"-n", "-n",
str(num_cores), str(num_cores),
"--cov-report=term",
"--cov=.",
"-m", "-m",
"not longrun", "not longrun",
"--html", "--html",
"test-report/index.html", "test-report/index.html",
"--junitxml=report.xml", "--junitxml=report.xml",
) ]
if coverage:
args += [
"--cov-report=term",
"--cov=.",
]
session.run(*args)
session.run("coverage", "html") session.run("coverage", "html")
session.run("coverage", "xml") session.run("coverage", "xml")
@nox.session(python=["3.10", "3.11", "3.12", "3.13"]) @nox.session(python=["3.10", "3.11", "3.12", "3.13"])
def testsuite_cpu(session: nox.Session): def testsuite_cpu(session: nox.Session):
install_pystencils_master(session) install_pystencils_master(session)
editable_install(session, ["alltrafos", "use_cython", "interactive", "tests"]) editable_install(session, ["alltrafos", "use_cython", "interactive", "tests"])
run_testsuite(session) run_testsuite(session, coverage=False)
@nox.session(python=["3.10", "3.11", "3.12", "3.13"]) @nox.session(python=["3.10", "3.11", "3.12", "3.13"])
...@@ -137,7 +143,9 @@ def testsuite_pystencils2(session: nox.Session, cupy_version: str | None): ...@@ -137,7 +143,9 @@ def testsuite_pystencils2(session: nox.Session, cupy_version: str | None):
if cupy_version is not None: if cupy_version is not None:
install_cupy(session, cupy_version, skip_if_no_cuda=True) install_cupy(session, cupy_version, skip_if_no_cuda=True)
session.install("git+https://i10git.cs.fau.de/pycodegen/pystencils.git@v2.0-dev") session.install(
"git+https://i10git.cs.fau.de/pycodegen/pystencils.git@fhennig/patches-for-lbmpy"
)
editable_install(session, ["alltrafos", "use_cython", "interactive", "tests"]) editable_install(session, ["alltrafos", "use_cython", "interactive", "tests"])
run_testsuite(session) run_testsuite(session)
...@@ -146,7 +154,9 @@ def testsuite_pystencils2(session: nox.Session, cupy_version: str | None): ...@@ -146,7 +154,9 @@ def testsuite_pystencils2(session: nox.Session, cupy_version: str | None):
@nox.session @nox.session
def quicktest(session: nox.Session): def quicktest(session: nox.Session):
parser = ArgumentParser() parser = ArgumentParser()
parser.add_argument("--sympy-master", action="store_true", help="Use latest SymPy master revision") parser.add_argument(
"--sympy-master", action="store_true", help="Use latest SymPy master revision"
)
args = parser.parse_args(session.posargs) args = parser.parse_args(session.posargs)
install_pystencils_master(session) install_pystencils_master(session)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment