-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: enable cctest to use generated objects #11956
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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. |
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>
Landed in 6a09a69...64af398 |
This requires a manual backport to v7.x |
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>
PR-URL: nodejs#11956 Ref: nodejs#9163 Reviewed-By: James M Snell <jasnell@gmail.com>
[post mortem] IMHO and keeping with previous practices, patches to @danbev is the change in tools/gyp/pylib/gyp/generator/make.py#L150 meaningful? since I'm vendoring the new |
MN just found your comment
|
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>
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>
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>
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>
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>
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>
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>
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 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 is a re-base of the gyp part of 6a09a69ec9d36b705e9bde2ac1a193566a702d96 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>
this is a re-base of the gyp part of 6a09a69ec9d36b705e9bde2ac1a193566a702d96 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>
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), orvcbuild test
(Windows) passesAffected core subsystem(s)
build