-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Tizen] Add code coverage for tests on QEMU #36245
base: master
Are you sure you want to change the base?
[Tizen] Add code coverage for tests on QEMU #36245
Conversation
Review changes with SemanticDiff. Analyzed 3 of 9 files. Overall, the semantic diff is 4% smaller than the GitHub diff.
|
PR #36245: Size comparison from f1457a2 to 43f4425 Full report (68 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #36245: Size comparison from f1457a2 to d605b12 Full report (68 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #36245: Size comparison from f1457a2 to ab0a679 Full report (68 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
scripts/build/builders/tizen.py
Outdated
gcov = os.path.join(os.environ['TIZEN_SDK_TOOLCHAIN'], 'bin/arm-linux-gnueabi-gcov') | ||
|
||
self._Execute(['lcov', '--gcov-tool', gcov, '--initial', '--ignore-errors', 'unused', '--capture', '--directory', os.path.join(self.output_dir, 'obj'), | ||
'--exclude', '**/src/controller/*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably be in some separate list as it is repeated and very independent from the other arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we want some shared gcov arguments and then only have the diffs inside build and post build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay like this?
if self.app == TizenApp.TESTS and self.use_coverage: | ||
|
||
self._Execute(self.lcov_args() + ['--output-file', os.path.join(self.coverage_dir, | ||
'lcov_test.info')], title="Initial coverage baseline") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'lcov_test.info')], title="Initial coverage baseline") | |
'lcov_test.info')], title="Update coverage") |
Feature
Add code coverage for Tizen tests on QEMU in a similar way other targets do this:
-coverage
target suffix,LCOV
tool and generating HTML as final output.This feature uses previously added (#35786) 9P-based file sharing to export
.gcda
files from guest to host and because of that slight path remapping was needed:As for the integrations tests:
lightning app
was omitted since it is being sandboxed and thus require extra effort.Testing
Successfully generated HTML file containing the combined coverage for all* tests.