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

build: enable cctest to use generated objects by danbev · Pull Request #11956 · nodejs/node · GitHub

/ node Public

build: enable cctest to use generated objects - #11956

Closed
danbev wants to merge 2 commits into
nodejs:masterfrom
danbev:cctest-refactoring
Closed

build: enable cctest to use generated objects#11956
danbev wants to merge 2 commits into
nodejs:masterfrom
danbev:cctest-refactoring

Conversation

danbev commented Mar 21, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

This commit tries to make it simpler to add unit tests (cctest) for
code that needs to test node core funtionality but that might not be
appropriate as an addon or a JavaScript test. An example of this could
be adding functionality targeted for situations when Node itself is
embedded.

Currently it was not as easy, or efficient, as one would have hoped to
add such tests. The object output directories vary for different
operating systems which we need to link to so that we don't have an
additional compilation step.

Details of changes

move LIBS inside of --start-group --end-group

Currently the LIBS specified in the 'libraries' section are not
being included in the --start-group --end-group section which
means that these libraries will not be searched causing issue
with linkers where the order matters.

add win specific paths for object files/libs

The OBJ_DIR on Windows seems to be Release\obj and all the object
files get placed in Release\obj\node. This differs from the unix
environments which specify the output object files using $@ which
will include the path. I thought about updating this and use $(@f)
to simply use the file name on unix and that way having all the
object files in the same directory like it is done on windows, but
that would mean a lot of changes to the gyp generator which I was
not comfortable doing as part of this commit.

add paths specific to aix

On AIX the output directory for object files seems to be named
'node_base' and not 'node' causing a failure on AIX.

add include ldflag for solaris

It looks like when cctest is to be compiled the includes are
missing. Added the SHARED_INTERMEDIATE_DIR as an include.

Refs: #9163

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

build

This commit tries to make it simpler to add unit tests (cctest) for
code that needs to test node core funtionality but that might not be
appropriate as an addon or a JavaScript test. An example of this could
be adding functionality targeted for situations when Node itself is
embedded.

Currently it was not as easy, or efficient, as one would have hoped to
add such tests. The object output directories vary for different
operating systems which we need to link to so that we don't have an
additional compilation step.

Refs: nodejs#9163
nodejs-github-bot added build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory. labels Mar 21, 2017

danbev commented Mar 21, 2017

Copy link
Copy Markdown
Contributor Author

jasnell 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

Side note: we should probably add details on how to create this kind of tests to the test guide.

danbev commented Mar 23, 2017

Copy link
Copy Markdown
Contributor Author

Side note: we should probably add details on how to create this kind of tests to the test guide.

I'll take a look and add a suggestion to the test guide.

jasnell pushed a commit that referenced this pull request Mar 24, 2017
This commit tries to make it simpler to add unit tests (cctest) for
code that needs to test node core funtionality but that might not be
appropriate as an addon or a JavaScript test. An example of this could
be adding functionality targeted for situations when Node itself is
embedded.

Currently it was not as easy, or efficient, as one would have hoped to
add such tests. The object output directories vary for different
operating systems which we need to link to so that we don't have an
additional compilation step.

PR-URL: #11956
Ref: #9163
Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell pushed a commit that referenced this pull request Mar 24, 2017
PR-URL: #11956
Ref: #9163
Reviewed-By: James M Snell <jasnell@gmail.com>

jasnell commented Mar 24, 2017

Copy link
Copy Markdown
Member

Landed in 6a09a69...64af398

Copy link
Copy Markdown
Contributor

This requires a manual backport to v7.x

jasnell mentioned this pull request Apr 4, 2017
aqrln pushed a commit to aqrln/node that referenced this pull request Apr 12, 2017
This commit tries to make it simpler to add unit tests (cctest) for
code that needs to test node core funtionality but that might not be
appropriate as an addon or a JavaScript test. An example of this could
be adding functionality targeted for situations when Node itself is
embedded.

Currently it was not as easy, or efficient, as one would have hoped to
add such tests. The object output directories vary for different
operating systems which we need to link to so that we don't have an
additional compilation step.

PR-URL: nodejs#11956
Ref: nodejs#9163
Reviewed-By: James M Snell <jasnell@gmail.com>
aqrln pushed a commit to aqrln/node that referenced this pull request Apr 12, 2017
PR-URL: nodejs#11956
Ref: nodejs#9163
Reviewed-By: James M Snell <jasnell@gmail.com>

refack commented Apr 16, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

[post mortem] IMHO and keeping with previous practices, patches to tools/gyp should be in their own commit, for easy rebasing.

@danbev is the change in tools/gyp/pylib/gyp/generator/make.py#L150 meaningful? since I'm vendoring the new GYP and wanted to know if it's needed?

refack commented Apr 16, 2017

Copy link
Copy Markdown
Contributor

MN just found your comment

move LIBS inside of --start-group --end-group

Currently the LIBS specified in the 'libraries' section are not
being included in the --start-group --end-group section which
means that these libraries will not be searched causing issue
with linkers where the order matters.

refack commented May 13, 2017

Copy link
Copy Markdown
Contributor

Another regression: #12952 😞

MylesBorins added baking-for-lts PRs that need to wait before landing in a LTS release. lts-watch-v6.x labels May 15, 2017
danbev added a commit to danbev/node that referenced this pull request May 30, 2017
This commit tries to make it simpler to add unit tests (cctest) for
code that needs to test node core funtionality but that might not be
appropriate as an addon or a JavaScript test. An example of this could
be adding functionality targeted for situations when Node itself is
embedded.

Currently it was not as easy, or efficient, as one would have hoped to
add such tests. The object output directories vary for different
operating systems which we need to link to so that we don't have an
additional compilation step.

PR-URL: nodejs#11956
Ref: nodejs#9163
Reviewed-By: James M Snell <jasnell@gmail.com>
gibfahn pushed a commit to gibfahn/node that referenced this pull request Jun 17, 2017
This commit tries to make it simpler to add unit tests (cctest) for
code that needs to test node core funtionality but that might not be
appropriate as an addon or a JavaScript test. An example of this could
be adding functionality targeted for situations when Node itself is
embedded.

Currently it was not as easy, or efficient, as one would have hoped to
add such tests. The object output directories vary for different
operating systems which we need to link to so that we don't have an
additional compilation step.

PR-URL: nodejs#11956
Backport-PR-URL: nodejs#12948
Ref: nodejs#9163
Reviewed-By: James M Snell <jasnell@gmail.com>

gibfahn commented Jun 20, 2017

Copy link
Copy Markdown
Member

@danbev if you want to backport this, can you backport it with any fixes that landed since (e.g. #12484).

Also do you know if there are any open issues that relate to this, or was everything fixed?

MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
This commit tries to make it simpler to add unit tests (cctest) for
code that needs to test node core funtionality but that might not be
appropriate as an addon or a JavaScript test. An example of this could
be adding functionality targeted for situations when Node itself is
embedded.

Currently it was not as easy, or efficient, as one would have hoped to
add such tests. The object output directories vary for different
operating systems which we need to link to so that we don't have an
additional compilation step.

PR-URL: #11956
Backport-PR-URL: #12948
Ref: #9163
Reviewed-By: James M Snell <jasnell@gmail.com>
refack pushed a commit to refack/node that referenced this pull request Jul 18, 2017
this is a re-base of the gyp part of
6a09a69
after bumping GYP version to
https://chromium.googlesource.com/external/gyp/+/eb296f67da078ec01f5e3a9ea9cdc6d26d680161

Original-PR-URL: nodejs#11956
Original-Ref: nodejs#9163
Original-Reviewed-By: James M Snell <jasnell@gmail.com>

PR-URL: nodejs#12450
Reviewed-By: João Reis <reis@janeasystems.com>
MylesBorins mentioned this pull request Jul 18, 2017
refack added the embedding Issues and PRs related to embedding Node.js in another project. label Aug 17, 2017
refack pushed a commit to refack/node that referenced this pull request Aug 23, 2017
this is a re-base of the gyp part of
6a09a69
after bumping GYP version to
https://chromium.googlesource.com/external/gyp/+/eb296f67da078ec01f5e3a9ea9cdc6d26d680161

Original-PR-URL: nodejs#11956
Original-Ref: nodejs#9163
Original-Reviewed-By: James M Snell <jasnell@gmail.com>

PR-URL: nodejs#12450
Reviewed-By: João Reis <reis@janeasystems.com>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Aug 25, 2017
this is a re-base of the gyp part of
6a09a69
after bumping GYP version to
https://chromium.googlesource.com/external/gyp/+/eb296f67da078ec01f5e3a9ea9cdc6d26d680161

Original-PR-URL: nodejs/node#11956
Original-Ref: nodejs/node#9163
Original-Reviewed-By: James M Snell <jasnell@gmail.com>

PR-URL: nodejs/node#12450
Reviewed-By: João Reis <reis@janeasystems.com>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Aug 28, 2017
this is a re-base of the gyp part of
6a09a69
after bumping GYP version to
https://chromium.googlesource.com/external/gyp/+/eb296f67da078ec01f5e3a9ea9cdc6d26d680161

Original-PR-URL: nodejs/node#11956
Original-Ref: nodejs/node#9163
Original-Reviewed-By: James M Snell <jasnell@gmail.com>

PR-URL: nodejs/node#12450
Reviewed-By: João Reis <reis@janeasystems.com>
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
this is a re-base of the gyp part of
6a09a69
after bumping GYP version to
https://chromium.googlesource.com/external/gyp/+/eb296f67da078ec01f5e3a9ea9cdc6d26d680161

Original-PR-URL: #11956
Original-Ref: #9163
Original-Reviewed-By: James M Snell <jasnell@gmail.com>

PR-URL: #12450
Reviewed-By: João Reis <reis@janeasystems.com>
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

build Issues and PRs related to build files or the CI. embedding Issues and PRs related to embedding Node.js in another project. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL