FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: refactor coverage logic by bcoe · Pull Request #35767 · nodejs/node · GitHub

/ node Public

test: refactor coverage logic - #35767

Closed
bcoe wants to merge 4 commits into
nodejs:masterfrom
bcoe:coverage-refactor
Closed

test: refactor coverage logic#35767
bcoe wants to merge 4 commits into
nodejs:masterfrom
bcoe:coverage-refactor

Conversation

bcoe commented Oct 23, 2020

Copy link
Copy Markdown
Contributor

Cleanup logic in Makefile for coverage. Update BUILDING.md accordingly.


The coverage logic in the Makefile had become a bit crufty:

  • it had logic specific to nyc, the coverage tool we were using prior to c8.
  • the instructions for collecting coverage reports locally were more complex than necessary (given improvements we've made).

CC: @nodejs/testing

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Cleanup logic in Makefile for coverage. Update BUILDING.md
accordingly.
bcoe requested review from Trott, addaleax and mhdawson October 23, 2020 03:09
nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. labels Oct 23, 2020
Comment thread BUILDING.md

```text
$ make coverage-clean
$ NODE_V8_COVERAGE=coverage/tmp python tools/test.py test/parallel/test-stream2-transform.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You can just set NODE_V8_COVERAGE, and then run tests any which way.

Comment thread Makefile Outdated
$(RM) out/$(BUILDTYPE)/obj.target/embedtest/src/*.gcno
$(RM) out/$(BUILDTYPE)/obj.target/embedtest/test/embedding/*.gcno
$(RM) -r coverage/tmp
$(FIND) out/$(BUILDTYPE)/obj.target -name "*.gcda" -type f -delete

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I was having trouble on OSX with left over gcno and gcda files, I believe it's safe to simply remove all files generated by gcov.

Comment thread Makefile
| sed 's/<[^>]*>//g'| sed 's/ //g'

COV_REPORT_OPTIONS = --reporter=html \
--temp-directory=out/$(BUILDTYPE)/.coverage --omit-relative=false \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

these options are encapsulated in the .nycrc file.

codecov-io commented Oct 23, 2020
edited by codecov Bot
Loading

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.91%. Comparing base (f44029e) to head (cd901bb).

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #35767    +/-   ##
========================================
  Coverage   87.90%   87.91%            
========================================
  Files         477      477            
  Lines      113172   113090    -82     
  Branches    25428    24628   -800     
========================================
- Hits        99480    99419    -61     
+ Misses       7991     7956    -35     
- Partials     5701     5715    +14     

see 89 files with indirect coverage changes

Comment thread BUILDING.md Outdated
Comment thread Makefile Outdated

Trott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM with or without my suggestions/comments addressed

nodejs deleted a comment Oct 23, 2020
nodejs deleted a comment Oct 23, 2020
nodejs deleted a comment Oct 23, 2020
nodejs deleted a comment Oct 23, 2020
nodejs deleted a comment Oct 23, 2020
nodejs deleted a comment Oct 23, 2020
nodejs deleted a comment Oct 23, 2020
Benjamin E. Coe and others added 2 commits October 23, 2020 09:59
Co-authored-by: Rich Trott <rtrott@gmail.com>

This comment has been minimized.

bcoe added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Oct 23, 2020

Trott commented Oct 23, 2020

Copy link
Copy Markdown
Member

@nodejs/build-files

Comment thread Makefile Outdated
Co-authored-by: Rich Trott <rtrott@gmail.com>

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Trott commented Oct 25, 2020

Copy link
Copy Markdown
Member

It sure seems as if the Raspberry Pi build failures are related to the Makefile changes here, but I'm not sure how?

Copy link
Copy Markdown
Collaborator

Trott commented Oct 25, 2020

Copy link
Copy Markdown
Member

In the same vein as "quit and restart the program to see if the problem goes away", I've kicked off a CI with Rebuild rather than Resume Build to see if that fixes it....

bcoe commented Oct 25, 2020

Copy link
Copy Markdown
Contributor Author

It sure seems as if the Raspberry Pi build failures are related to the Makefile changes here, but I'm not sure how?

@Trott odd, I don't think any of the coverage rules should be being executed right?

nodejs-github-bot commented Oct 25, 2020
edited by bcoe
Loading

Copy link
Copy Markdown
Collaborator

bcoe commented Oct 25, 2020

Copy link
Copy Markdown
Contributor Author

@Trott restarting worked, but I'm slightly concerned it took so many restarts?

Trott commented Oct 25, 2020
edited
Loading

Copy link
Copy Markdown
Member

@Trott restarting worked, but I'm slightly concerned it took so many restarts?

Perhaps the other times were all Resume Builds and not Rebuilds and that is why the results were the same?

bcoe pushed a commit that referenced this pull request Oct 25, 2020
Cleanup logic in Makefile for coverage. Update BUILDING.md
accordingly.

PR-URL: #35767
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

bcoe commented Oct 25, 2020

Copy link
Copy Markdown
Contributor Author

Landed in ba907ff

bcoe closed this Oct 25, 2020
bcoe deleted the coverage-refactor branch October 25, 2020 14:24
targos pushed a commit that referenced this pull request Nov 3, 2020
Cleanup logic in Makefile for coverage. Update BUILDING.md
accordingly.

PR-URL: #35767
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
targos mentioned this pull request Nov 3, 2020
BethGriggs pushed a commit that referenced this pull request Dec 8, 2020
Cleanup logic in Makefile for coverage. Update BUILDING.md
accordingly.

PR-URL: #35767
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BethGriggs pushed a commit that referenced this pull request Dec 10, 2020
Cleanup logic in Makefile for coverage. Update BUILDING.md
accordingly.

PR-URL: #35767
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BethGriggs mentioned this pull request Dec 10, 2020
targos pushed a commit that referenced this pull request Mar 3, 2021
Cleanup logic in Makefile for coverage. Update BUILDING.md
accordingly.

PR-URL: #35767
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 6, 2021
Cleanup logic in Makefile for coverage. Update BUILDING.md
accordingly.

PR-URL: #35767
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
danielleadams mentioned this pull request May 3, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL