Skip to content

Commit

Permalink
Exclude directories from coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
AniqJaved committed Sep 5, 2023
1 parent edcef66 commit 95bcd9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/root-ci-config/build_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,11 @@ def rebase(base_ref, head_ref) -> None:
def create_coverage_xml() -> None:
result = subprocess_with_log(f"""
cd '{WORKDIR}/build'
gcovr --cobertura-pretty --gcov-ignore-errors=no_working_dir_found --merge-mode-functions=merge-use-line-min -r ../src ../build -o cobertura-cov.xml
gcovr --output=cobertura-cov.xml --cobertura-pretty --gcov-ignore-errors=no_working_dir_found --merge-mode-functions=merge-use-line-min --exclude-unreachable-branches --exclude-directories="roottest|runtutorials|interpreter" --exclude='.*/G__.*' --exclude='.*/(roottest|runtutorials|externals|ginclude|googletest-prefix|macosx|winnt|geombuilder|cocoa|quartz|win32gdk|x11|x11ttf|eve|fitpanel|ged|gui|guibuilder|guihtml|qtgsi|qtroot|recorder|sessionviewer|tmvagui|treeviewer|geocad|fitsio|gviz|qt|gviz3d|x3d|spectrum|spectrumpainter|dcache|hdfs|foam|genetic|mlp|quadp|splot|memstat|rpdutils|proof|odbc|llvm|test|interpreter)/.*' --gcov-exclude='.*_ACLiC_dict[.].*' '--exclude=.*_ACLiC_dict[.].*' -v -r ../src ../build
""")

if result != 0:
die(result, "Failed to create test coverage")


if __name__ == "__main__":
main()
13 changes: 4 additions & 9 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ on:
- cron: '0 1 * * *'

# https://github.com/root-project/root/pull/12112#issuecomment-1411004278
# DISABLED: takes 4 hours! Might clang-coverage be a solution?
#pull_request:
# branches:
# - 'master'
# paths-ignore:
# - 'doc/**'
# - 'documentation/**'

workflow_call:
inputs:
Expand Down Expand Up @@ -43,7 +36,7 @@ env:
PYTHONUNBUFFERED: true

jobs:

build-linux:
if: github.repository_owner == 'root-project' || github.event_name == 'pull_request'

Expand Down Expand Up @@ -84,7 +77,6 @@ jobs:
ls -la
'


- name: Apply option override from matrix for this job
env:
OVERRIDE: "coverage=On"
Expand Down Expand Up @@ -123,6 +115,8 @@ jobs:
--repository ${{ github.server_url }}/${{ github.repository }}
"



- name: Nightly build
if: github.event_name == 'schedule'
run: ".github/workflows/root-ci-config/build_root.py
Expand All @@ -144,3 +138,4 @@ jobs:
flags: unittests
name: codecov-umbrella
verbose: true

0 comments on commit 95bcd9e

Please sign in to comment.