Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes #494

Merged
merged 2 commits into from
May 27, 2016
Merged

Bugfixes #494

merged 2 commits into from
May 27, 2016

Conversation

tribal-tec
Copy link
Member

  • fix include paths in project header file for generated files within the binary dir
  • fix coverage report generation after 5dd04a3 if LCOV_EXCLUDE is empty

@@ -120,7 +120,7 @@ function(add_coverage_targets TEST_TARGET)
# 'tests/*' excluded otherwise unit test source file coverage is produced
add_custom_target(${PROJECT_NAME}-lcov-remove
COMMAND ${LCOV} -q --remove lcov.info '*.l*' '*.y*' 'tests/*' 'CMake/test/*'
'*/install/*' 'moc_*' 'qrc_*' ${GENERATED_FILES} '${LCOV_EXCLUDE}'
'*/install/*' 'moc_*' 'qrc_*' ${GENERATED_FILES} ${LCOV_EXCLUDE}
Copy link

Choose a reason for hiding this comment

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

No, the quotes are needed at least for Brayns, we added them here: https://github.com/Eyescale/CMake/pull/469/files

Copy link
Member Author

Choose a reason for hiding this comment

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

With the quotes and LCOV_EXCLUDE is emtpy, the coverage report is empty as well, hence the modification. I think after the previous PR wrt LCOV_EXCLUDE not set anymore with test files this variable is most of the time empty.

Copy link

Choose a reason for hiding this comment

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

I got that, but if it is not empty then the quotes are required. Check with Brayns, but the most correct solution is to add a tmp variable which is either empty if LCOV_EXCLUDE is empty or '${LCOV_EXCLUDE}' quoted if it's not.

Copy link
Member Author

Choose a reason for hiding this comment

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

There is no target 'BRayns-coverage', so I don't know what you are referring to.

Copy link

Choose a reason for hiding this comment

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

I am not sure, maybe @favreau remembers the details? What I do know is that this quotes were added for a good reason, and it was observed trying to configure Brayns, but I can't reproduce the problem now. Only ZeroBuf seems to use this variable, but I think we had found more than one occurrences at the time.

@rdumusc
Copy link

rdumusc commented May 26, 2016

+1 otherwise if it works

@tribal-tec
Copy link
Member Author

tribal-tec commented May 26, 2016

From experimenting I learned that empty quotes ' ' to lcov --remove leads to an empty lcov2.info file. It was never empty so far as we had the tests added, but maybe as BRayns has no tests this was the problem you had. But the coverage report was correct then. No tests, no coverage :)

@tribal-tec tribal-tec merged commit a9606be into Eyescale:master May 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants