2024-12-03 06:57:43 +05:30
|
|
|
//coverage related args to be passed to pytest
|
|
|
|
ext.get_coverage_args = { test_name = "" ->
|
|
|
|
|
2024-12-10 19:57:11 +05:30
|
|
|
def coverage_file_name = "coverage-${project.name}${test_name}.xml"
|
2024-12-03 06:57:43 +05:30
|
|
|
|
|
|
|
/*
|
|
|
|
Tools that aggregate and analyse coverage tools search for the coverage result files. Keeping them under one folder
|
|
|
|
will minimize the time spent searching through the full source tree.
|
|
|
|
*/
|
2025-01-10 00:17:35 +05:30
|
|
|
def base_path = "${rootProject.buildDir}/coverage-reports/${rootProject.relativePath(project.projectDir)}/"
|
2024-12-03 06:57:43 +05:30
|
|
|
|
|
|
|
/*
|
|
|
|
--cov=src was added via setup.cfg in many of the python projects but for some reason, was not getting picked up
|
|
|
|
consistently, so adding it explicitly. Centralizing these params would make it easier to adjust them for all python
|
|
|
|
projects (with overrides being in the sub-project build script.)
|
|
|
|
*/
|
|
|
|
return "--cov-report xml:${base_path}/${coverage_file_name} --cov=src"
|
|
|
|
}
|