0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

461 Commits

Author SHA1 Message Date
Rich Trott
d38e643409
test: remove obsolete debugger tests
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>
2017-09-13 17:58:38 -03:00
Benjamin Coe
e9442d1582
test: exclude write-coverage from coverage report
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>
2017-09-08 00:31:57 -03:00
Simon Brewster
9168b8cf47
test: use no-save and no-package-lock flags
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>
2017-09-08 00:26:19 -03:00
Bradley Farias
c8a389e19f module: Allow runMain to be ESM
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>
2017-09-07 15:18:32 -05:00
Rich Trott
70c775a810 test: run abort tests
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>
2017-08-26 16:30:35 -07:00
Daniel Bevenius
a36b540502 build: for --enable-static, run only cctest
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>
2017-08-24 05:52:23 +02:00
Jon Moss
8850fd4da1 build: allow proper generation of html docs
`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>
2017-08-21 14:17:11 +02:00
Anna Henningsen
491cc76871
src: use unordered_set instead of custom rb tree
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>
2017-08-17 20:26:59 +02:00
Ruslan Bekenev
2710616d53 build: remove duplicated code
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>
2017-08-16 17:04:23 +02:00
James M Snell
eac0147085 tools: checkout for unassigned DEP00XX codes
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>
2017-08-16 00:04:03 -07:00
jeyanthinath
e88908d868
build: enable C++ linting for src/*/*
Fixes: https://github.com/nodejs/node/issues/14490
PR-URL: https://github.com/nodejs/node/pull/14497
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-07 10:16:30 +08:00
Evan Lucas
e36166bd18 build: codesign tarball binary on macOS
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>
2017-07-19 16:38:32 -05:00
Evan Lucas
2309f3aaa6 build,tools: do not force codesign prefix
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>
2017-07-19 16:38:27 -05:00
Michaël Zasso
016d81ceec
build: run test-hash-seed at the end of test-v8
The v8 and test-hash-seed targets cannot be run in parallel because they
need different copies of the deps/v8 directory.

Ref: https://github.com/nodejs/node/pull/14004#issuecomment-314774773
PR-URL: https://github.com/nodejs/node/pull/14219
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-07-14 23:47:09 +08:00
Ali Ijaz Sheikh
9fedc1f096
test: verify hash seed uniqueness
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>
2017-07-11 17:47:37 +01:00
Rich Trott
22436b055d build: check for linter in bin rather than lib
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>
2017-06-17 12:56:50 -07:00
Gibson Fahnestock
b7473c2117 build: fail linter if linting not available
PR-URL: https://github.com/nodejs/node/pull/13658
Ref: https://github.com/nodejs/node/pull/13645#issuecomment-308100452
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-06-16 09:34:34 -07:00
Bryce Baril
ca50a19610 build: use existing variable to reduce complexity
PR-URL: https://github.com/nodejs/node/pull/2883
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-06-07 20:24:36 +02:00
Rich Trott
7b56fd8cf0 build: streamline JS test suites in Makefile
* 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>
2017-06-02 11:27:45 -07:00
Peter Dave Hello
1474b7a032 build: xz tarball extreme compression
PR-URL: https://github.com/nodejs/node/pull/10626
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-05-27 17:30:08 -04:00
Rod Vagg
7a1dc1fba3
build: avoid /docs/api and /docs/doc/api upload
Fixes: https://github.com/nodejs/node/issues/12833
PR-URL: https://github.com/nodejs/node/pull/12957
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
2017-05-23 20:37:13 +02:00
Joyee Cheung
6342988053 build: clean up napi build in test-addons-clean
PR-URL: https://github.com/nodejs/node/pull/13034
Ref: https://github.com/nodejs/node/issues/13031
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rajaram Gaunker <rajarams@gmail.com>
2017-05-17 11:07:39 -04:00
Daniel Bevenius
ad7b98baa8 build: don't print directory for GNUMake
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>
2017-05-17 12:34:41 +02:00
Trevor Norris
c68ebe8436
makefile: add async-hooks to test and test-ci
PR-URL: https://github.com/nodejs/node/pull/12892
Ref: https://github.com/nodejs/node/pull/11883
Ref: https://github.com/nodejs/node/pull/8531
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-05-10 22:22:40 +02:00
Brian White
7a5bac5d36
build: add target for checking for perm deopts
PR-URL: https://github.com/nodejs/node/pull/12456
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-30 03:17:25 -04:00
Vse Mozhet Byt
42dca99cd7 doc, tools: add doc linting to CI
PR-URL: https://github.com/nodejs/node/pull/12640
Fixes: https://github.com/nodejs/node/issues/12635
Refs: https://github.com/nodejs/node/pull/12563
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-25 22:44:09 +03:00
Vse Mozhet Byt
b4fea2a3d6 doc: add eslint-plugin-markdown
* install eslint-plugin-markdown
* add doc/.eslintrc.yaml
* add `<!-- eslint-disable rule -->` or `<!-- eslint-disable -->`
  for the rest of problematic code
* .js files in doc folder added to .eslintignore
* update Makefile and vcbuild.bat

PR-URL: https://github.com/nodejs/node/pull/12563
Refs: https://github.com/nodejs/node/pull/12557#issuecomment-296015032
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-04-25 00:06:17 +03:00
Sakthipriyan Vairamani (thefourtheye)
716d831a64 build: make linter targets silent
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>
2017-04-17 14:46:06 -07:00
Ruslan Bekenev
47c255ef68 build: run cpplint even if jslint failed
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>
2017-04-14 21:50:09 +03:00
Sebastian Van Sande
3d2181c5f0 test: run the addon tests last
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>
2017-04-13 18:34:29 -04:00
Joyee Cheung
baa2602539 build: add test-gc-clean and test-gc PHONY rules
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>
2017-04-11 11:27:22 +08:00
Joyee Cheung
c694633328 build: sort phony rules
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>
2017-04-11 11:26:58 +08:00
Gibson Fahnestock
4dde87620a
build: don't test addons-napi twice
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>
2017-04-09 18:27:25 +01:00
Gibson Fahnestock
d19809a3c5
build: avoid passing kill empty input in Makefile
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>
2017-04-04 10:44:53 +01:00
Gibson Fahnestock
57b850e975
build: use $(RM) in Makefile for consistency
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>
2017-04-04 10:33:34 +01:00
Jason Ginchereau
56e881d0b0
n-api: add support for abi stable module API
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>
2017-04-03 10:31:25 +02:00
Joyee Cheung
813b312b0e build: add rule to clean addon tests build
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>
2017-02-26 12:46:26 +08:00
Rich Trott
189b49a4d3 build: fail on CI if leftover processes
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>
2017-02-23 11:46:40 -08:00
Daniel Bevenius
8e8fbd80d0 test: add support for --gtest_filter
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>
2017-02-23 08:45:16 +01:00
Brian White
29ff16f043
build: fix newlines in addon build output
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>
2017-02-22 22:01:14 -05:00
Wayne Andrews
f8ee197614 build: add code coverage to make
PR-URL: https://github.com/nodejs/node/pull/10856
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-02-17 10:25:36 -05:00
Ben Noordhuis
b7ac0b25b8 build: don't rebuild test/gc add-on unnecessarily
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>
2017-02-14 14:52:31 +01:00
Jan Krems
fc3f0d63b4
build: add node-inspect integration test
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>
2017-02-13 14:50:29 +01:00
Ben Noordhuis
bae093a70b test: remove dependency on node-weak
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>
2017-02-11 14:21:29 +01:00
Rich Trott
90ab68bc34 build: clear stalled jobs on POSIX CI hosts
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>
2017-02-10 13:18:02 -08:00
Stewart X Addison
2a295bc53b doc: clarify msg when doc/api/cli.md not updated
PR-URL: https://github.com/nodejs/node/pull/10872
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-03 08:22:07 -08:00
Phillip Johnsen
01b90ee1db tools,doc: add Google Analytics tracking.
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>
2017-01-25 21:54:34 +01:00
Daniel Bevenius
22e2c47f42
build: fix node_g target
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>
2016-12-07 16:58:58 +01:00
sxa555
f3d613ed07 build: Don't regenerate node symlink
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>
2016-12-05 15:26:18 -05:00
Ben Noordhuis
8264a22256 test: run cpplint on files in test/cctest
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>
2016-12-01 14:01:42 +01:00