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

build: fix coverage build #18409

Closed
wants to merge 1 commit into from
Closed

build: fix coverage build #18409

wants to merge 1 commit into from

Conversation

yhwang
Copy link
Member

@yhwang yhwang commented Jan 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.

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
Copy link
Member

@addaleax addaleax 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 taking care of this!

@addaleax
Copy link
Member

Makefile Outdated
@@ -191,6 +191,8 @@ coverage-test: coverage-build
$(RM) out/$(BUILDTYPE)/obj.target/node/gen/*.gcda
$(RM) out/$(BUILDTYPE)/obj.target/node/src/*.gcda
$(RM) out/$(BUILDTYPE)/obj.target/node/src/tracing/*.gcda
$(RM) out/$(BUILDTYPE)/obj.target/node_lib/{src,gen}/*.gcda
Copy link
Member

@joyeecheung joyeecheung Jan 28, 2018

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
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
Copy link
Member Author

yhwang commented Jan 29, 2018

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
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
Copy link
Member Author

yhwang commented Jan 31, 2018

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
Copy link
Member Author

yhwang commented Jan 31, 2018

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
Copy link
Member

mhdawson commented Jan 31, 2018

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

Copy link
Member

@mhdawson mhdawson left a comment

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
Copy link
Member Author

yhwang commented Feb 1, 2018

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

@BridgeAR
Copy link
Member

BridgeAR commented Feb 1, 2018

@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
Copy link
Member Author

yhwang commented Feb 1, 2018

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

@mhdawson
Copy link
Member

mhdawson commented Feb 1, 2018

@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
Copy link
Member Author

yhwang commented Feb 1, 2018

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

@mhdawson
Copy link
Member

mhdawson commented Feb 2, 2018

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

@mhdawson
Copy link
Member

mhdawson commented Feb 2, 2018

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
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
Copy link
Member Author

yhwang commented Feb 21, 2018

@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