0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

428 Commits

Author SHA1 Message Date
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
Sakthipriyan Vairamani (thefourtheye)
c5678d3c32 tools: improve docopen target in Makefile
1. As it is, it just tries to build only the `all.html` file. If none of
   the other files are built already, generated page will not be good.
   To fix this, we process the assets and generate HTML files first.

2. After the HTML is generated, `google-chrome` is used to open the
   generated file in browser. This is not very portable as it might not
   be installed or installations might have used a different name. So,
   we use Python's webbrowser module to open the file.

PR-URL: https://github.com/nodejs/node/pull/9436

Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-17 17:24:47 +05:30
Rich Trott
eed8b0525c test: move tick-processor tests to own directory
The tick-processor tests are inherently non-deterministic. They
therefore have false negatives from time to time. They also
sometimes leave extra processes running.

Move them to their own directory until these issues are sorted. Note
that this means that the tests will not be run in CI. Like the inspector
tests and other tests, they will have to be run manually when they are
wanted.

PR-URL: https://github.com/nodejs/node/pull/9506
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Matthew Loring <mattloring@google.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-11-09 19:34:56 -08:00
Jaideep Bajwa
4aca347527 v8: update make-v8.sh to use git
google build tool gclient doesn't support
svn anymore. Updating v8 build script to use
git instead.

PR-URL: https://github.com/nodejs/node/pull/9393
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-09 17:34:22 -05:00
Daniel Bevenius
a504516782 build: add MAKEFLAGS="-j1" to node-gyp
Currently, when building the addons the following warning is displayed:
make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent
make rule.

Adding the MAKEFLAGS="-j1" to avoid the warning.

Also updated the log message to say that it is building the addon and
not running the test as I think that is more accurate.

PR-URL: https://github.com/nodejs/node/pull/9450
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-11-07 13:37:35 +01:00
Daniel Bevenius
bc229d0867 build: reduce noise from doc target
The doc target currently echos the complete shell command, which might
produces a lot of output. Using this change the actual commands run
are still shown.

Before:
[ -e tools/doc/node_modules/js-yaml/package.json ] || \
        [ -e tools/eslint/node_modules/js-yaml/package.json ] || \
        if [ -x ./node ]; then \
            cd tools/doc && ../.././node ../.././deps/npm/bin/npm-cli.js
install; \
        else \
            cd tools/doc && node ../.././deps/npm/bin/npm-cli.js
install; \
        fi
[ -x ./node ] && ./node tools/doc/generate.js --node-version=v8.0.0
--format=html --template=doc/template.html doc/api/assert.md >
out/doc/api/assert.html || node tools/doc/generate.js
--node-version=v8.0.0 --format=html --template=doc/template.html
doc/api/assert.md > out/doc/api/assert.html
Input file = doc/api/assert.md

After:
[ -x ./node ] && ./node tools/doc/generate.js --node-version=v8.0.0
--format=html --template=doc/template.html doc/api/assert.md >
out/doc/api/assert.html || node tools/doc/generate.js
--node-version=v8.0.0 --format=html --template=doc/template.html
doc/api/assert.md > out/doc/api/assert.html
Input file = doc/api/assert.md

To verify run:
$ make docclean
$ make doc

PR-URL: https://github.com/nodejs/node/pull/9457
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James Snell <jasnell@gmail.com>
2016-11-07 13:22:03 +01:00
Sakthipriyan Vairamani (thefourtheye)
f9504a549e
build: start comments at beginning of line
As the comments are indented in Makefile, they are actually echoed
on the screen. This patch makes sure that the comments actually start
at the beginning of the line, and so not echoed and ignored.

PR-URL: https://github.com/nodejs/node/pull/9375

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-11-05 15:04:23 +05:30
Sakthipriyan Vairamani (thefourtheye)
54d34314e3 build: make node-gyp output silent
As it is, node-gyp produces a lot of build related verbose messages.
Latest node-gyp upgrade allows us to specify --silent flag to suppress
those messages. Except for CI, addons build will run silently.

PR-URL: https://github.com/nodejs/node/pull/8990

Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-11-02 14:50:40 +00:00
Daniel Bevenius
0ed6338016 build: fix config.gypi target
The config.gypi target has a recipe that uses the control function error
to report if the config.gypi file is missing or if it is stale (the
configure file was updated which is a prerequisite of this rule).

GNU make has two phases, immediate and deferred. During the first phase
 it will expand any variables or functions as the makefile is parsed.
The recipe in this case is a shell if statement, which is a deferred
construct. But the control function $(error) is an immediate construct
which will cause the makefile processing to stop during the first phase
of the Make process.

If I understand this correctly the only possible outcome of this rule is
the "Stale config.gypi, please re-run ./configure"  message which will
be done in the first phase and then exit. The shell condition will not
be considered. So it will never report that the config.gypi is missing.

bnoordhuis suggested that we simply change this into a single error
message:
"Missing or stale config.gypi, please run configure"

PR-URL: https://github.com/nodejs/node/pull/9053
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-10-14 07:38:45 +02:00
Anna Henningsen
9def09728b build: make addons build dep. on node_version.h
Make the `test/addons/.buildstamp` file dependent on
`src/node_version.h` since addons need to be re-compiled after
`NODE_MODULE_VERSION` bumps, e.g. as it happened recently
in b5bdff876b.

PR-URL: https://github.com/nodejs/node/pull/8861
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-06 01:01:03 +03:00
Ben Noordhuis
a63dd852b4 build: run cctests as part of test-ci target
Enable the cctests on the CI now that they know how to write TAP output.

PR-URL: https://github.com/nodejs/node/pull/8034
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-03 19:47:50 +02:00
Michaël Zasso
98241f4f08 build: do not clean V8 gtest directory
There is a file in there required to build V8. The rest is being ignored
by V8's .gitignore anyway.

PR-URL: https://github.com/nodejs/node/pull/8317
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2016-09-22 09:55:46 +02:00
Michaël Zasso
fbfc15c51b build: update V8 gypfile paths
The location of various gypfiles has changed in V8 5.2.

PR-URL: https://github.com/nodejs/node/pull/8317
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2016-09-22 09:53:18 +02:00
Anna Henningsen
9391cb0fde
build: run npm install for doc builds in tarball
Run `npm install` before building the documentation from release
tarballs. The doctool currently depends on `js-yaml`, which
is imported from the `tools/eslint` subtree; however, release
tarballs don’t contain that directory.

Running `npm install` is clearly not a beautiful solution,
but it works.

Fixes: https://github.com/nodejs/node/issues/7872
PR-URL: https://github.com/nodejs/node/pull/8413
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-20 13:58:06 +02:00
Eugene Ostroukhov
b4a249f66b inspector: introduce a smoke test
This test executes a simple debug session over the inspector protocol.

PR-URL: https://github.com/nodejs/node/pull/8429
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
2016-09-19 12:40:16 -07:00
Johan Bergström
2168432c36 build: don't require processing docs for nightlies
Opt-out `nightly` and `next-nightly` from the documentation
requirement since these docs aren't meant to be published.

This fixes our nightly jobs in CI.

PR-URL: https://github.com/nodejs/node/pull/8325
Fixes: https://github.com/nodejs/build/issues/478
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-09-01 08:58:54 -03:00
Bartosz Sosnowski
b1bbc68fb1 benchmark: support for multiple http benchmarkers
This adds support for multiple HTTP benchmarkers. Adds autocannon
as the secondary benchmarker.

PR-URL: https://github.com/nodejs/node/pull/8140
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2016-08-31 17:49:26 +02:00
Rich Trott
5a7a6d9b01 tools: enable caching for jslint task
PR-URL: https://github.com/nodejs/node/pull/8296
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-08-30 10:42:25 -07:00
Michael Dawson
1657f12f75 build: fix dependencies on AIX
Addon tests were still starting to run before the node exp file
creation was complete.

- remove process_outputs_as_sources as it did not fix the
  problem
- update create_expfile.sh so that exp file is created in a
  temporary file and then renamed to final name so that
  file is only visible once it is complete
- update target used in building Addons so that for
  AIX it depends on the exp file being available

PR-URL: https://github.com/nodejs/node/pull/8285
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-08-29 16:20:18 -04:00
Rich Trott
dbbbf217de build: do not lint src dir for JS errors
There are no JavaScript files in the `src` directory. It can be
safely omitted from the JavaScript linting step.

PR-URL: https://github.com/nodejs/node/pull/8128
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-18 14:39:23 -07:00
Rich Trott
e313c0286b tools: update to ESLint 3.2.2
PR-URL: https://github.com/nodejs/node/pull/7999
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-08-09 21:19:02 -07:00
Daniel Bevenius
eeaff74af2 build: adding config.gypi dep to addons/.buildstamp
Currently the build-addons target is called as part of the
test target, and it has test/addons/.buildstamp as a dependency.
When running ./configure --debug and later switching/
updating branches you can be in a situation where the config.gypi
files in the addons build directories are using an incorrect
value for default_configuration. Currently this can happen and you
will get test errors as there are a few test that depend on the
value of default_configuration to be Release.

Ben Noordhuis provided the solution for this by adding a dependency to
config.gypi, which is generated when running ./configure, and will
correct this situation.

This commit is related to #7860. Please see the dicussion in that
issue regarding the test using hard-coded paths.

PR-URL: https://github.com/nodejs/node/pull/7893
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-08-01 10:57:44 -07:00
Andreas Madsen
0f9bfaa7c5 benchmark: move cli parts of common.js into run.js
It wasn't obviouse that common.js was the main cli tool.

PR-URL: https://github.com/nodejs/node/pull/7094
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-07-26 12:48:46 +02:00
Andreas Madsen
ee2843b4ea benchmark: remove unused files
These files are very old and undocumented. Most likely nobody are
using them.

PR-URL: https://github.com/nodejs/node/pull/7094
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-07-26 12:42:40 +02:00
Brian White
68b966b2de
build: add conflict marker check during CI lint
PR-URL: https://github.com/nodejs/node/pull/7625
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-07-20 19:05:25 -04:00
Rich Trott
cbbddc4fb0 tools: increase lint coverage
Extend linting to tools/license2rtf.js and any other JS that gets added
to the `tools` directory by default.

This incidentally simplifies lint invocation.

PR-URL: https://github.com/nodejs/node/pull/7647
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-07-13 11:17:33 -07:00
Michaël Zasso
22492db931 build: use BUILDTYPE when building V8 in Makefile
Without this it would always compile Release and Debug builds.

Ref: https://github.com/nodejs/node/issues/7477
PR-URL: https://github.com/nodejs/node/pull/7482
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-07-10 17:22:32 +02:00
Michaël Zasso
69ef9b1eaa build: add v8 requirement to test-v8* in Makefile
The test targets expect that V8 is built in deps/v8/out

Ref: https://github.com/nodejs/node/issues/7477
PR-URL: https://github.com/nodejs/node/pull/7482
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-07-10 17:19:46 +02:00
Anna Henningsen
1fe0708fd4
test: really run addon tests on make test
Fix a `s/addon/addons/` typo in the Makefile.

PR-URL: https://github.com/nodejs/node/pull/7542
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-07-05 23:08:12 +02:00
João Reis
7cbbec516d build: split CI rules in Makefile
Some CI jobs compile Node and run the tests on different machines.
This change enables collaborators to have finer control over what runs
on these jobs, such as the exact suites to run. The test-ci rule was
split into js and native, to allow for addons to be compiled only on
the machines that are going to run them.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: https://github.com/nodejs/node/pull/7317
2016-07-02 16:57:06 +01:00
Myles Borins
cae428a05a tools: explicit path for V8 test tap output
Currently we do not specific an absolute path for the tap output of the
V8 test suite. This is proving to be unreliable across release lines.

By prepending `$(PWD)` to each path we can guarantee it will always be
in the root folder.

PR-URL: https://github.com/nodejs/node/pull/7460
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-06-29 14:32:52 -07:00
Ben Noordhuis
dbe4b58565 src: lint v8abbr.h
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-28 21:21:21 +02:00
Ben Noordhuis
f1d2792c1c src: lint node_lttng_tp.h
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-28 21:21:21 +02:00
Ben Noordhuis
a26c3cd54f src: lint node_win32_perfctr_provider.cc
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-28 21:21:21 +02:00