Skip to content

build: fix coverage build#18409

Closed
yhwang wants to merge 1 commit into
nodejs:masterfrom
yhwang:fix-coverage
Closed

build: fix coverage build#18409
yhwang wants to merge 1 commit into
nodejs:masterfrom
yhwang:fix-coverage

Conversation

@yhwang

@yhwang yhwang commented Jan 27, 2018

Copy link
Copy Markdown
Member

After adding the node_lib target in node.gyp, most of the node source
files are moved to that target. When coverage option is enabled,
corresponding cflags and ldflags are needed in that target as well.
gcovr also needs to check .gcda data for both node and node_lib.

Fixes: #18402

Signed-off-by: Yihong Wang yh.wang@ibm.com

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Jan 27, 2018

@addaleax addaleax 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.

Thanks for taking care of this!

@addaleax

Copy link
Copy Markdown
Member

Comment thread Makefile Outdated

@joyeecheung joyeecheung Jan 28, 2018

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.

Can you write this as two commands so it would be accepted by GNU make 4.1? See #18332

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done! thanks.

@yhwang

yhwang commented Jan 29, 2018

Copy link
Copy Markdown
Member Author

updated the change based on @joyeecheung comment. Please kick off a new CI to verify it.

not sure about the failure of fedora24. Let's see if it fails again in new CI.

@BridgeAR

Copy link
Copy Markdown
Member

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 31, 2018
@yhwang

yhwang commented Jan 31, 2018

Copy link
Copy Markdown
Member Author

still got weird failures on debian8-x86 and fedora24. However, debian8-64 and other fedora jobs are green. And actually, this change doesn't change anything if you don't specify --coverage. When running CI, there is no --coverage option.....

@yhwang

yhwang commented Jan 31, 2018

Copy link
Copy Markdown
Member Author

Seems the debian failure is related to performance. That should not be related to this PR. For those failures in fedora24, I am going to verify that locally. At the same time, I rebased my branch and Please kick off another CI to verify it.

@mhdawson

mhdawson commented Jan 31, 2018

Copy link
Copy Markdown
Member

Another CI run to see if the fedora24 failures re-occur: https://ci.nodejs.org/job/node-test-pull-request/12862/

@mhdawson mhdawson 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.

LGTM provided CI run is green.

@yhwang

yhwang commented Feb 1, 2018

Copy link
Copy Markdown
Member Author

The failures in debian8-64 happened in other PR and should be irrelevant.

@BridgeAR

BridgeAR commented Feb 1, 2018

Copy link
Copy Markdown
Member

@yhwang would you be so kind and rebase? :-)

@BridgeAR BridgeAR removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 1, 2018
After adding the node_lib target in node.gyp, most of the node source
files are moved to that target. When coverage option is enabled,
corresponding cflags and ldflags are needed in that target as well.
gcovr also needs to check .gcda data for both node and node_lib.

Fixes: nodejs#18402

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
@yhwang

yhwang commented Feb 1, 2018

Copy link
Copy Markdown
Member Author

@BridgeAR rebase is done. Please kick off a CI.

@mhdawson

mhdawson commented Feb 1, 2018

Copy link
Copy Markdown
Member

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 1, 2018
@yhwang

yhwang commented Feb 1, 2018

Copy link
Copy Markdown
Member Author

only failed in linux-arm. I guess this is good.

@mhdawson

mhdawson commented Feb 2, 2018

Copy link
Copy Markdown
Member

All ARM failures look like infra issues, and there were no failures on earlier CI runs so I think we are good. Landing.

@mhdawson

mhdawson commented Feb 2, 2018

Copy link
Copy Markdown
Member

Landed as a89d215

@mhdawson mhdawson closed this Feb 2, 2018
mhdawson pushed a commit that referenced this pull request Feb 2, 2018
After adding the node_lib target in node.gyp, most of the node source
files are moved to that target. When coverage option is enabled,
corresponding cflags and ldflags are needed in that target as well.
gcovr also needs to check .gcda data for both node and node_lib.

PR-URL: #18409
Fixes: #18402
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@yhwang yhwang deleted the fix-coverage branch February 2, 2018 17:12
@addaleax addaleax removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 4, 2018
@MylesBorins

Copy link
Copy Markdown
Contributor

Should this be backported to v9.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

@gibfahn gibfahn mentioned this pull request Feb 21, 2018
@yhwang

yhwang commented Feb 21, 2018

Copy link
Copy Markdown
Member Author

@MylesBorins I guess code coverage is only for master build. right? if that's the case, then there is no need to backport.

addaleax pushed a commit to addaleax/node that referenced this pull request Feb 27, 2018
After adding the node_lib target in node.gyp, most of the node source
files are moved to that target. When coverage option is enabled,
corresponding cflags and ldflags are needed in that target as well.
gcovr also needs to check .gcda data for both node and node_lib.

PR-URL: nodejs#18409
Fixes: nodejs#18402
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@addaleax addaleax mentioned this pull request Feb 27, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
After adding the node_lib target in node.gyp, most of the node source
files are moved to that target. When coverage option is enabled,
corresponding cflags and ldflags are needed in that target as well.
gcovr also needs to check .gcda data for both node and node_lib.

PR-URL: nodejs#18409
Fixes: nodejs#18402
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C++ coverage broken

8 participants