The tests in `test/debugger` all fail since the removal of the
pre-inspector debugger (if they weren't already failing). They do not
run in CI (probably because they were never reliable). Remove them and
associated fixtures.
PR-URL: https://github.com/nodejs/node/pull/15139
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Added a .nyrc configuration file that can be used to configure
test coverage.
Added an exclude rule that removes write-coverage.js from coverage
reports.
Pulled reporter configuration into .nycrc and added an additional
text reporter.
PR-URL: https://github.com/nodejs/node/pull/15194
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Use these flags when running make coverage so that a package-lock.json
file is not generated and npm does not attempt to save the deps to a
non-existent package.json file.
PR-URL: https://github.com/nodejs/node/pull/15196
Refs: https://github.com/nodejs/node/pull/15190/files#r136932786
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This follows the EPS an allows the node CLI to have ESM as an entry point.
`node ./example.mjs`. A newer V8 is needed for `import()` so that is not
included. `import.meta` is still in specification stage so that also is not
included.
PR-URL: https://github.com/nodejs/node/pull/14369
Author: Bradley Farias <bradley.meck@gmail.com>
Author: Guy Bedford <guybedford@gmail.com>
Author: Jan Krems <jan.krems@groupon.com>
Author: Timothy Gu <timothygu99@gmail.com>
Author: Michaël Zasso <targos@protonmail.com>
Author: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Currently, tests in test/abort do not run in CI.
This change configures the test runner to not write core files for abort
tests and to run them.
PR-URL: https://github.com/nodejs/node/pull/14013
Fixes: https://github.com/nodejs/node/issues/14012
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Currently when building with --enable-static and running the test target
the following error will be reported:
Building addon
/node/test/addons/01_function_arguments/
env: ./node: No such file or directory
make[1]: *** [test/addons/.buildstamp] Error 1
Note that this is with a clean build where no prior node executable was
built.
This commit suggests only running the cctest target when --enable-static
is specified.
PR-URL: https://github.com/nodejs/node/pull/14892
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
`gen-doc` always calls `gen-json`, which means it's impossible to
generate html docs. Changed this to pass in the command the user wants
to run.
PR-URL: https://github.com/nodejs/node/pull/14932
Fixes: https://github.com/nodejs/node/issues/14930
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Use a standard hash-based container instead of the custom included
red/black tree implementation. There is likely no noticeable
performance difference, and if there is one, it is very likely
to be an improvement.
PR-URL: https://github.com/nodejs/node/pull/14826
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Makefile contains copy-pasted code in some targets and this commit
aims to remove it.
PR-URL: https://github.com/nodejs/node/pull/13482
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com>
Check for `DEP00XX` codes on release build like we do with `REPLACEME`
PR-URL: https://github.com/nodejs/node/pull/14702
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Previously, we were signing the binary that was released in the .pkg,
but not the binary released in the tarball.
PR-URL: https://github.com/nodejs/node/pull/14179
Fixes: https://github.com/nodejs/node/issues/11936
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Allow passing the prefix in via the PKGDIR env var. This will allow us
to use this same script to codesign the binary tarball.
PR-URL: https://github.com/nodejs/node/pull/14179
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This tests that the hash seed used by V8 for hashing is random.
PR-URL: https://github.com/nodejs/node-private/pull/84
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: mhdawson - Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Make the "can we lint?" check in Makefile and vcbuild.bat depend on
bin/eslint.js rather than lib/eslint.js. In ESLint 4.0.0, lib/eslint.js
is not present. The lint rules call bin/eslint.js so check for that
instead.
PR-URL: https://github.com/nodejs/node/pull/13645
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* alphabetize the JS test suites
* Use CI_JS_SUITES variable instead of listing all tests
PR-URL: https://github.com/nodejs/node/pull/13340
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Currently when running make targets the directory is printed on some
operating systems (Linux for example):
$ make lint
make[1]: Entering directory '/work/node'
Running JS linter...
./node tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules
--ext=.js,.md \
benchmark doc lib test tools
make[1]: Leaving directory '/work/node'
make[1]: Entering directory '/work/node'
Running C++ linter...
On other operating systems the directory is not printed. This commit
suggests adding a flag to make this consistent for GNUMake by not
printing the directory.
PR-URL: https://github.com/nodejs/node/pull/13042
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
The linter targets are printing the commands they execute on screen.
This patch reduces the noise by not printing the commands.
PR-URL: https://github.com/nodejs/node/pull/12423
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
lint target now runs both linters
even if one of them failed.
PR-URL: https://github.com/nodejs/node/pull/12276
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Running the addon tests before the parallel, sequential, etc. tests
can be a problem if there is a bug in node that prevents the
addon tests from running properly. When the addon tests fail for any
reason, then none of the other tests (e.g. parallel, etc.)
are executed.
Running the addon tests last fixes this.
Refs: https://github.com/nodejs/node/issues/12031
PR-URL: https://github.com/nodejs/node/pull/12062
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Sort phony rules and place them one per line for the ease of
updating and backporting
PR-URL: https://github.com/nodejs/node/pull/12059
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
The addons-napi testsuite is already included in $(CI_NATIVE_SUITES), so
we don't need to manually specify it in the test-ci target as well.
PR-URL: https://github.com/nodejs/node/pull/12201
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Using `xargs -r` on some platforms and `xargs` on others doesn't work,
we can't guarantee whether xargs is GNU or not. Avoid the issue by only
running kill if there are processes to clean.
PR-URL: https://github.com/nodejs/node/pull/12158
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Also allows someone to reassign `$RM`, e.g. with `RM=rm -v` instead of
`rm -f` (the default) should they want to. We're currently using a
mixture of `$(RM)` and `rm -f`.
There are a couple of places which aren't doing -f, have them do it for
consistency.
PR-URL: https://github.com/nodejs/node/pull/12157
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Add support for abi stable module API (N-API) as "Experimental feature".
The goal of this API is to provide a stable Node API for native
module developers. N-API aims to provide ABI compatibility guarantees
across different Node versions and also across different
Node VMs - allowing N-API enabled native modules to just work
across different versions and flavors of Node.js without recompilation.
A more detailed introduction is provided in:
https://github.com/nodejs/node-eps/blob/master/005-ABI-Stable-Module-API.md
and https://github.com/nodejs/abi-stable-node/blob/doc/VM%20Summit.pdf.
The feature, during its experimental state, will be guarded by a runtime
flag "--napi-modules". Only when this flag is added to the command line
will N-API modules along with regular non N-API modules be supported.
The API is defined by the methods in "src/node_api.h" and
"src/node_api_types.h". This is the best
starting point to review the API surface. More documentation will follow.
In addition to the implementation of the API using V8, which is included
in this PR, the API has also been validated against chakracore and that
port is available in
https://github.com/nodejs/abi-stable-node/tree/api-prototype-chakracore-8.x.
The current plan is to provide N-API support in versions 8.X and 6.X
directly. For older versions, such as 4.X or pre N-API versions of 6.X,
we plan to create an external npm module to provide a migration path
that will allow modules targeting older Node.js versions to use the API,
albeit without getting the advantage of not having to recompile.
In addition, we also plan an external npm package with C++ sugar to
simplify the use of the API. The sugar will be in-line only and will
only use the exported N-API methods but is not part of the N-API
itself. The current version is in:
https://github.com/nodejs/node-api.
This PR is a result of work in the abi-stable-node repo:
https://github.com/nodejs/abi-stable-node/tree/doc,
with this PR being the cumulative work on the api-prototype-8.x
branch with the following contributors in alphabetical order:
Author: Arunesh Chandra <arunesh.chandra@microsoft.com>
Author: Gabriel Schulhof <gabriel.schulhof@intel.com>
Author: Hitesh Kanwathirtha <hiteshk@microsoft.com>
Author: Ian Halliday <ianhall@microsoft.com>
Author: Jason Ginchereau <jasongin@microsoft.com>
Author: Michael Dawson <michael_dawson@ca.ibm.com>
Author: Sampson Gao <sampsong@ca.ibm.com>
Author: Taylor Woll <taylor.woll@microsoft.com>
PR-URL: https://github.com/nodejs/node/pull/11975
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Add a `test-addons-clean` to the Makefile
to clean up files generated during testing addons.
PR-URL: https://github.com/nodejs/node/pull/11519
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
If any tests leave processes running after testing results are complete,
fail the test run.
PR-URL: https://github.com/nodejs/node/pull/11269
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
It might be useful to sometimes run a single cctest while debugging/
developing. This commit adds support for Google Test's --gtest_filter
to enable this.
To list the tests available:
$ make list-gtests
UtilTest.
ListHead
StringEqualNoCase
StringEqualNoCaseN
ToLower
Malloc
Calloc
UncheckedMalloc
UncheckedCalloc
InspectorSocketTest.
ReadsAndWritesInspectorMessage
BufferEdgeCases
AcceptsRequestInSeveralWrites
ExtraTextBeforeRequest
ExtraLettersBeforeRequest
RequestWithoutKey
KillsConnectionOnProtocolViolation
CanStopReadingFromInspector
CloseDoesNotNotifyReadCallback
CloseWorksWithoutReadEnabled
ReportsHttpGet
HandshakeCanBeCanceled
GetThenHandshake
WriteBeforeHandshake
CleanupSocketAfterEOF
EOFBeforeHandshake
Send1Mb
ErrorCleansUpTheSocket
InspectorSocketServerTest.
InspectorSessions
ServerDoesNothing
ServerWithoutTargets
ServerCannotStart
StoppingServerDoesNotKillConnections
Then run a single test:
$ env GTEST_FILTER=InspectorSocketTest.GetThenHandshake make cctest
Note: Google Test filter = InspectorSocketTest.GetThenHandshake
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from InspectorSocketTest
[ RUN ] InspectorSocketTest.GetThenHandshake
[ OK ] InspectorSocketTest.GetThenHandshake (0 ms)
[----------] 1 test from InspectorSocketTest (0 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (0 ms total)
[ PASSED ] 1 test.
PR-URL: https://github.com/nodejs/node/pull/11474
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Interpretation of escape sequences with echo is not as consistent
across platforms as printf, so use the latter instead.
PR-URL: https://github.com/nodejs/node/pull/11466
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Remove the explicit dependency on $(NODE_EXE), it always triggers a
rebuild due to it being a .PHONY rule. Add-ons in test/addons/ have
the same implicit dependency so it isn't completely without precedent.
PR-URL: https://github.com/nodejs/node/pull/11311
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This just adds an additional make target (`make test-node-inspect`) but
will not include the new debugger in releases.
PR-URL: https://github.com/nodejs/node/pull/10187
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Replace node-weak with a small hand-rolled add-on. We can now drop
node-weak and nan, reducing the size of the source tree by about 750 kB
and the size of the tarball by about 150-300 kB.
PR-URL: https://github.com/nodejs/node/pull/11239
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Sometimes, after a cluster or debug test fails, a fixture hangs around
and holds onto a needed port, causing subsequent CI runs to fail. This
adds a command I've been running manually when this occurs. The command
will clear the stalled jobs before a CI run.
PR-URL: https://github.com/nodejs/node/pull/11246
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
Adds Google Analytics tracking script to all doc pages when
`DOCS_ANALYTICS` is set when running `make`:
```bash
$ DOCS_ANALYTICS=<GOOGLE ANALYTICS ID> make
```
By default (when `DOCS_ANALYTICS` is not set), no tracking scripts are
included.
It respects "Do Not Track" settings end users might have in their
browser.
Also changes make target `doc-upload` from depending on the
`$(TARBALL)` target, to only depend on `doc` directly.
PR-URL: https://github.com/nodejs/node/pull/6601
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Currently when running make node_g the following error is displayed:
if [ ! -r node -o ! -L ]; then ln -fs out/Debug/node node_g; fi
/bin/sh: line 0: [: argument expected
It looks like there was a typo for the NODE_EXE where node became
lowercase instead of uppercase.
Ref: https://github.com/nodejs/node/pull/9827
PR-URL: https://github.com/nodejs/node/pull/10153
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
The node -> out/*/node symlink is getting recreated in parallel with
other targets in the makefile which require it (e.g. test-ci) and
this seems to be causing a race condition which is showing up on AIX
Fixes: https://github.com/nodejs/node/issues/9825
PR-URL: https://github.com/nodejs/node/pull/9827
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
Enable cpplint for files in test/cctest. Fix up the style issues it
reports.
PR-URL: https://github.com/nodejs/node/pull/9787
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>