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

unittests: disable coverage report filtering #12273

Merged
merged 1 commit into from
Jan 20, 2020

Conversation

maciejbocianski
Copy link
Contributor

@maciejbocianski maciejbocianski commented Jan 17, 2020

Summary of changes

Disable coverage report filtering because of poor results.

e.g. mbed test --unittests -r Socket --coverage htmlg
This command will run all unittests with names containing Socket and then create coverage report with the same scheme, filtering all source files with names containing Socket.

The problem is that coverage report will be correct only when filtered test name will be the same as corresponding source file name (to be covered) - the same (-r) pattern is used to filter both test names and source file names used in coverage report

Due to described problems it was decided to disable coverage report filtering.
-r will only filter test names and pattern won't be passed to coverage report generator.

Impact of changes

Migration actions required

Documentation


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@jamesbeyond
@michalpasztamobica


Disable coverage report filtering because of poor results.
Test name filtering pattern (-r) was used to filter coverage
report causing wrong results when filtered test name wasn't
matching the implementation source file name
Copy link
Contributor

@michalpasztamobica michalpasztamobica left a comment

Choose a reason for hiding this comment

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

Thanks for this change. It makes perfect sense to filter only the test cases and then see the whole picture of what they cover (especially for moduletests).

@ciarmcom ciarmcom requested review from michalpasztamobica and a team January 17, 2020 14:00
@ciarmcom
Copy link
Member

@maciejbocianski, thank you for your changes.
@michalpasztamobica @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 17, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 17, 2020

Test run: SUCCESS

Summary: 1 of 1 test jobs passed
Build number : 1
Build artifacts

Copy link
Contributor

@jamesbeyond jamesbeyond left a comment

Choose a reason for hiding this comment

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

LGTM

@0xc0170 0xc0170 added release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0 and removed needs: review labels Jan 20, 2020
@0xc0170 0xc0170 merged commit b08dc22 into ARMmbed:master Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants