Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor ccov target dependencies tree#37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
rlalik wants to merge2 commits intoStableCoder:main
base:main
Choose a base branch
Loading
fromrlalik:update_ccov_deps_tree

Conversation

rlalik
Copy link
Contributor

Problem for me was that e.g. callingccov-capture-TARGET was doing much more than the name was telling, e.g. it was cleaning all coverage data collected until then. Alsoccov was doing the same for all targets.

I draw the targets dependencies tree (- - is a target dependency,+ is extra action done by the target):

- ccov  - ccov-TARGET    - ccov-capture-TARGET      - ccov-preprocessing        - ccov-clean          + remove *.list files        + make cov directory      + remove coverage info      + zero counters      + run TARGET      + generate coverage info    + gen html

So callingccov was going down the tree and removing and regenerating everything. So any extra changes done in the meantime like manually called targets with special options were lost.

So I change the hierarchy into this ((**) denotes new targets):

- ccov-html (**)  - ccov-html-TARGET- ccov:  - ccov-clean-TARGET (**)    + remove coverage info    + zero counters  - ccov-run-TARGET    - ccov-preprocessing      ...    + run TARGET  - ccov-html-TARGET (**)    - ccov-capture-TARGET      + generate coverage info    + gen html

So nowccov-clean-TARGET just clean,ccov-capture-TARGET just captures the data, butccov does all of them so it is backward compatible. The new targetccov-html-TARGET captures the data and generates html. Here I made exception that-html calls-capture because this makes sense. Theccov-clean-TARGET is new and it sole purpose is to remove files. Task which was previously done byccov-capture-TARGET.

Similar change I made forccov-all-* targets. Old scheme was:

- ccov-all  - ccov-all-capture    - ccov-preprocessing    - ccov-all-preprocessing    + remove coverage info    + zero counters    + generate coverage info  + gen html

new scheme is

- ccov-all  - ccov-preprocessing  - ccov-all-processing  - ccov-all-clean (**)    + remove coverage info    + zero counters  - ccov-all-html (**)    - ccov-all-capture      + generate coverage info    + gen html

Now I can just run my targets in a custom way and callmake ccov-all-html to collect data. Previously it was not possible.

Comment on lines +463 to +517
if(NOT TARGET ccov-html)
add_custom_target(ccov-html)
endif()
add_dependencies(ccov-html ccov-html-${target_code_coverage_COVERAGE_TARGET_NAME})

Copy link
Owner

@StableCoderStableCoderMay 9, 2022
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

ccov-html/ccov-html-$TARGET_NAME is only available for GCC with this change. But because it's here, it's being added for both GCC and Clang. Can this be shifted down into the if(GNU) section just underneath?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Oh, I missed that, will fix it.

@rlalikrlalikforce-pushed theupdate_ccov_deps_tree branch from27dd369 tocd4009eCompareJuly 18, 2025 22:21
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@StableCoderStableCoderStableCoder left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@rlalik@StableCoder

[8]ページ先頭

©2009-2025 Movatter.jp