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

70 Commits

Author SHA1 Message Date
brad-decker
18016d3b3f test: replace assert.equal with assert.strictEqual
Using NodeTodo I learned of a need to swap out the .equal function
with .strictEqual in a few test files.

https://twitter.com/NodeTodo/status/803657321993961472
https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c

additional commits squashed:
.strictEqual's argument signature is actual, expected, [message].
Previously some statements were listed as expected, actual.
As asked in PR i swapped them to match the correct argument signature.

PR-URL: https://github.com/nodejs/node/pull/9842
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-12-01 13:50:25 -06:00
Ben Noordhuis
13c4f44e97 test: add new.target add-on regression test
Add a test that checks that new.target inheritance works when inheriting
from a constructor defined in C++.

PR-URL: https://github.com/nodejs/node/pull/9689
Refs: https://github.com/nodejs/node/issues/9288
Refs: https://github.com/nodejs/node/pull/9293
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-11-21 14:34:25 +01:00
Rich Trott
837e822992 test: refactor make-callback-recurse test
Move copy/pasted callback into its own function.

PR-URL: https://github.com/nodejs/node/pull/9498
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-11-09 19:21:30 -08:00
Ben Noordhuis
921d2b080e src: make cross-context MakeCallback() calls work
Check that invoking a callback on a receiver from a different context
works.

It ran afoul of an `env->context() == isolate->GetCurrentContext()`
assertion so retrieve the environment from the callback context and
the context to enter from the environment's context() method.

We could also have retrieved the environment from the receiver's context
and that would have made little practical difference.  It just seemed
more correct to get it from the callback context because that is the
actual execution context.

PR-URL: https://github.com/nodejs/node/pull/9221
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-10-25 13:18:01 +02:00
Daniel Bevenius
09d41e22cc test: rename target to exports for consistency
The doc/api/addons.md document contains examples of Addon
Initialization functions that take a parameter named exports.
This also matches the name used in node.cc when calling:
mp->nm_register_func(exports, module, mp->nm_priv);

Currently, a number of the tests name this same parameter target. This
commit renames target to exports for consistency.

PR-URL: https://github.com/nodejs/node/pull/9135
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-10-19 19:57:02 +02:00
Daniel Bevenius
9bb250ba34 test: enable node-module-version/test.js with debug
Commit fdca79fbc0 ("test: enable addons
test to pass with debug build") enabled the addons tests to pass when
the build type is of type debug (configure --debug).

test/addons/node-module-version/test.js was recently added and expects
the the build type to be of type Release (like most of the others until
recently). This commit allows this test to pass when the build type if
of type debug.

PR-URL: https://github.com/nodejs/node/pull/9093
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-10-17 09:53:28 +02:00
James M Snell
a6e1be4a4e src: update module version mismatch error message
Fixes: https://github.com/nodejs/node/issues/8379
PR-URL: https://github.com/nodejs/node/pull/8391
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-10-10 08:56:31 -07:00
Daniel Bevenius
fdca79fbc0 test: enable addons test to pass with debug build
Currently when running configure with the --debug option in combination
with the tests (./configure --debug && make -j8 test) there are a few
addon tests that fail with error messages similar to this:

=== release test ===
Path: addons/load-long-path/test
fs.js:558
  return binding.open(pathModule._makeLong(path), stringToFlags(flags),
mode);
                 ^

Error: ENOENT: no such file or directory, open
'/nodejs/node/test/addons/load-long-path/build/Release/binding.node'
    at Object.fs.openSync (fs.js:558:18)
    at Object.fs.readFileSync (fs.js:468:33)
    at Object.<anonymous>
(/nodejs/node/test/addons/load-long-path/test.js:28:19)
    at Module._compile (module.js:560:32)
    at Object.Module._extensions..js (module.js:569:10)
    at Module.load (module.js:477:32)
    at tryModuleLoad (module.js:436:12)
    at Function.Module._load (module.js:428:3)
    at Module.runMain (module.js:594:10)
    at run (bootstrap_node.js:382:7)
Command: out/Release/node
/nodejs/node/test/addons/load-long-path/test.js

This commit allows for the tests to pass even if the configured build
type is of type debug.

PR-URL: https://github.com/nodejs/node/pull/8836
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-10-06 10:27:30 -07:00
Dany Shaanan
d469321946 tools: add eslint rule prefer-assert-methods
PR-URL: https://github.com/nodejs/node/pull/8622
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Jackson Tian <shvyo1987@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
2016-09-20 16:35:39 -07:00
Anna Henningsen
4c9b0bdf2f test: add an zlib binding addon test
Add a test addon that makes use of the zlib implementation bundled
with node, checking that a compression/decompression round-trip works.

This is largely based on the already-existing OpenSSL addon.

Fixes: https://github.com/nodejs/node/issues/7535
PR-URL: https://github.com/nodejs/node/pull/8039
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-08-17 18:44:00 -07:00
Gibson Fahnestock
9a0d26fa43 test: remove internal headers from addons
PR-URL: https://github.com/nodejs/node/pull/7947
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-05 12:49:39 -07:00
cjihrig
04b4d15b39 test: use mustCall() for simple flow tracking
Many of the tests use variables to track when callback functions
are invoked or events are emitted. These variables are then
asserted on process exit. This commit replaces this pattern in
straightforward cases with common.mustCall(). This makes the
tests easier to reason about, leads to a net reduction in lines
of code, and uncovered a few bugs in tests. This commit also
replaces some callbacks that should never be called with
common.fail().

PR-URL: https://github.com/nodejs/node/pull/7753
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-07-18 17:14:16 -04:00
Ben Noordhuis
b4d4fd939c build: export openssl symbols on windows
Export symbols from the bundled openssl for add-ons to link against.

Fixes: https://github.com/nodejs/node-v0.x-archive/issues/4051
PR-URL: https://github.com/nodejs/node/pull/6274
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-07-05 16:09:58 +02:00
Ben Noordhuis
3c85f4e237 test: don't use internal headers in add-on tests
There is no real need and it causes endless grief on Windows with some
of the upcoming changes.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-29 13:49:35 +02:00
Ben Noordhuis
0ba0eca986 src: fix readability/namespace cpplint warnings
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
a92089b6bd src: alias BINARY to LATIN1
Make BINARY an alias for LATIN1 rather than a distinct enum value.

PR-URL: https://github.com/nodejs/node/pull/7284
Refs: https://github.com/nodejs/node/pull/7262
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-06-19 09:26:37 +02:00
Ben Noordhuis
6b48324363 src: fix erroneous fallthrough in ParseEncoding()
A missing 'break' statement unintentionally allowed "linary"
and "luffer" as alternatives for "binary" and "buffer".

Regression introduced in commit 54cc7212 ("buffer: introduce latin1
encoding term".)

PR-URL: https://github.com/nodejs/node/pull/7262
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-13 11:24:28 +02:00
Trevor Norris
54cc7212df buffer: introduce latin1 encoding term
When node began using the OneByte API (f150d56) it also switched to
officially supporting ISO-8859-1. Though at the time no new encoding
string was introduced.

Introduce the new encoding string 'latin1' to be more explicit. The
previous 'binary' and documented as an alias to 'latin1'.  While many
tests have switched to use 'latin1', there are still plenty that do both
'binary' and 'latin1' checks side-by-side to ensure there is no
regression.

PR-URL: https://github.com/nodejs/node/pull/7111
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-07 13:51:14 -06:00
Alexis Campailla
6e2ae8aeee test,win: skip addons/load-long-path on WOW64
This test fails on WOW64 because of a bug in the OS, and there is
no acceptable workaround.

Ref: https://github.com/nodejs/node/issues/3667

PR-URL: https://github.com/nodejs/node/pull/6675
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
2016-05-27 12:05:49 +02:00
Ben Noordhuis
eff96d32dc src: add include guards to internal headers
For consistency with the newly added src/base64.h header, check that
NODE_WANT_INTERNALS is defined and set in internal headers.

PR-URL: https://github.com/nodejs/node/pull/6948
Refs: https://github.com/nodejs/node/pull/6910
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-05-25 09:54:24 +02:00
Rich Trott
517d1da47c test: favor strictEqual() in addon test
Replace `assert.equal()` with `assert.strictEqual()` throughout
`addon/make-callback-recurse/test.js`.

PR-URL: https://github.com/nodejs/node/pull/6704
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-05-13 19:27:15 -07:00
James M Snell
5d38d543cd src,module: add --preserve-symlinks command line flag
Add the `--preserve-symlinks` flag. This makes the changes added
in #5950 conditional. By default the old behavior is used. With
the flag set, symlinks are preserved, switching to the new
behavior. This should be considered to be a temporary solution
until we figure out how to solve the symlinked peer dependency
problem in a more general way that does not break everything
else.

Additional test cases are included.

PR-URL: https://github.com/nodejs/node/pull/6537
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-13 11:43:47 -07:00
Jeremiah Senkpiel
52bae222a3 test: abstract skip functionality to common
The tap skipping output is so prevalent yet obscure in nature that we
ought to move it into it's own function in test/common.js

PR-URL: https://github.com/nodejs/node/pull/6697
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2016-05-12 16:43:35 -04:00
Rich Trott
a56da51a38 benchmark,test,lib: remove extra spaces
In preparation for stricter linting, remove extra spaces.

PR-URL: https://github.com/nodejs/node/pull/6645
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-05-11 23:18:16 -07:00
Ben Noordhuis
f644368e7c test: build addons with V8_DEPRECATION_WARNINGS=1
PR-URL: https://github.com/nodejs/node/pull/6652
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-10 17:10:08 +02:00
Rich Trott
6c49714df0 test,tools: limit lint tolerance of gc global
Lint rules permitted the `gc` global in any test file. This change
limits it to just the files that need it.

PR-URL: https://github.com/nodejs/node/pull/6324
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-28 19:22:16 -07:00
Ali Ijaz Sheikh
b73e1b3c5a test: fix another flaky stringbytes test
Avoid depending on precise timing of when an object will be collected
by GC. This test was missed by #6039 as it happened to be in a
different directory than the rest.

Ref: https://github.com/nodejs/node/pull/6039
PR-URL: https://github.com/nodejs/node/pull/6073
Reviewed-By: Trott - Rich Trott <rtrott@gmail.com>
2016-04-06 06:22:40 -07:00
Ali Ijaz Sheikh
f4ebd5989a test: fix flakiness of stringbytes-external
The tests used to rely on precise timing of when a JavaScript object
would be garbage collected to ensure that there is enough memory
available on the system. Switch the test to use a malloc/free pair
instead.

Ref: https://github.com/nodejs/node/pull/5945
PR-URL: https://github.com/nodejs/node/pull/6039
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: evanlucas - Evan Lucas <evanlucas@me.com>
Reviewed-By: Trott - Rich Trott <rtrott@gmail.com>
2016-04-05 16:08:45 -07:00
Anna Henningsen
be97db92af test: add buffer alignment regression tests
Buffers instances can have arbitrary alignment. `node-ffi` depends on
this. Add some regression tests to ensure we don't break this in the
future.

PR-URL: https://github.com/nodejs/node/pull/5752
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2016-03-19 07:08:08 -07:00
Trevor Norris
ab6fe5998a test: add addons test for MakeCallback
Make sure that calling MakeCallback multiple times within the same stack
does not allow the nextTickQueue or MicrotaskQueue to be processed in
any more than the first MakeCallback call.

Check that domains enter/exit poperly with multiple MakeCallback calls
and that errors are handled as expected

PR-URL: https://github.com/nodejs/node/pull/4507
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-02-12 14:03:34 -07:00
Rich Trott
bc39d6a3a6 test: remove unused vars
Remove unused vars in tests

PR-URL: https://github.com/nodejs/node/pull/4536
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-01-05 08:59:58 -08:00
Rich Trott
6abd8b587e test: remove unused modules
Many tests use require() to import modules that subsequently never gets
used. This removes those imports and, in a few cases, removes other
unused variables from tests.

PR-URL: https://github.com/nodejs/node/pull/4475
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-01-01 16:37:02 -08:00
Rich Trott
a030c5cf49 test: remove unused assert module imports
Many test modules load assert but do not use it. This change removes
those instances.

It also removes a handful of other unused variables when they were
nearby.

PR-URL: https://github.com/nodejs/node/pull/4438
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-12-30 11:45:34 -08:00
Michael Cornacchia
c0bac95147 test: fix path to module for repl test on Windows
Use path join to construct the path instead of concatenating strings.
Replace backslash with double backslash so that they are escaped
correctly in the string passed to REPL.

PR-URL: https://github.com/nodejs/node/pull/3608
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-15 16:33:11 -08:00
Rich Trott
35f2f64edd tools: Use throw new Error() consistently
In preparation for a lint rule that will enforce `throw new Error()`
over `throw Error()`, fix the handful of instances in the code that
use `throw Error()`.

PR-URL: https://github.com/nodejs/node/pull/3714
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-10 21:00:35 -08:00
Fedor Indutny
827ee498e3 buffer: neuter external nullptr buffers
Neuter external `nullptr` buffers, otherwise their contents will be
materialized on access, and the buffer instance will be internalized.

This leads to a crash like this:

    v8::ArrayBuffer::Neuter Only externalized ArrayBuffers can be
    neutered

Fix: #3619
PR-URL: https://github.com/nodejs/node/pull/3624
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-11-02 08:37:38 -05:00
Junliang Yan
9f967058e8 test: fix heap-profiler link error LNK1194 on win
Fix the following error message in windows using VS 2013:

    LINK : fatal error LNK1194: cannot delay-load 'node.exe'
    due to import of data symbol '"__declspec(dllimport)
    const v8::OutputStream::`vftable'"
    (__imp_??_7OutputStream@v8@@6B@)'; link without
    /DELAYLOAD:node.exe

PR-URL: https://github.com/nodejs/node/pull/3572
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-28 21:13:34 +01:00
Junliang Yan
4139f2a820 test: fix missing unistd.h on windows
PR-URL: https://github.com/nodejs/node/pull/3532
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-28 20:58:38 +01:00
Ben Noordhuis
3a091d29bf test: add node::MakeCallback() test coverage
PR-URL: https://github.com/nodejs/node/pull/3478
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-10-23 18:43:06 +02:00
Fedor Indutny
931118c9d7 buffer: fix assertion error in WeakCallback
`CallbackInfo` is now bound to `ArrayBuffer` instance, not `Uint8Array`,
therefore `SPREAD_ARG` will abort with:

    Assertion failed: ((object)->IsUint8Array())

Make changes necessary to migrate it to `ArrayBuffer`.

See: https://github.com/nodejs/node/pull/3080#issuecomment-147502167

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3329
2015-10-12 20:47:10 -07:00
Rich Trott
6f63a4af0e test: linting for buffer-free-callback test
Test added in d1f24044 does not pass linting rule added in 3de353b5.
Fixed in this commit. `common` module required in all tests except
those that intentionally leak variables.

PR-URL: https://github.com/nodejs/node/pull/3230
Fixes: https://github.com/nodejs/node/issues/3229
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-10-06 21:35:00 -07:00
Fedor Indutny
d1f24044b9 buffer: FreeCallback should be tied to ArrayBuffer
FreeCallback should be invoked on the storage disposal (`ArrayBuffer`),
not when the view (`Uint8Array` or `Buffer`) is disposed. This causes
bug and crashes in addons which create buffers and store only slices of
them.

PR-URL: https://github.com/nodejs/node/pull/3198
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-10-06 18:57:46 -04:00
Rich Trott
c78091d689 test: load common.js in all tests
common.js contains code that detects leaked variables.

In preparation for an eslint rule that will enforce loading common.js in
test files, load it everywhere it can be loaded and use an
`eslint-disable` comment for files that intentionally leak.

PR-URL: https://github.com/nodejs/node/pull/3157
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-10-06 15:11:47 -07:00
Justin Chase
8593b3e8eb module: use UNC paths when loading native addons
When using require to load a native addon the path must be converted
into a long path, otherwise the addon will fail to be loaded on
windows if the path is longer than 260 characters.

PR-URL: https://github.com/nodejs/node/pull/2965
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
2015-10-05 22:09:51 +02:00
Michaël Zasso
4abc896a82 src: replace usage of v8::Handle with v8::Local
v8::Handle is deprecated: https://codereview.chromium.org/1224623004

PR-URL: https://github.com/nodejs/io.js/pull/2202
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-09-06 21:38:05 +10:00
Ben Noordhuis
1aa9d3a2ab build: make ci test addons in test/addons
Make `make test-addons` part of the `make test-ci` target.

Use order-only prerequisites to make generating and building the add-ons
concurrency-safe when $JOBS > 1 and fudge the dependency on $(NODE_EXE)
so that add-ons are only rebuilt when needed instead of all the time.

PR-URL: https://github.com/nodejs/node/pull/2428
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-08-25 12:03:57 +02:00
Ben Noordhuis
71119284f9 test: drop Isolate::GetCurrent() from addon tests
v8::Isolate::GetCurrent() is not exactly deprecated at this point but
its use is strongly discouraged.  Update the addon tests so they no
longer use it.

PR-URL: https://github.com/nodejs/node/pull/2427
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-18 21:27:43 +02:00
Ben Noordhuis
8f4022e44b test: lint addon tests
Add files in test/addon to the `make cpplint` rule and fix up existing
style issues.  Tests scraped from doc/api/addon.md are filtered out
because those are predominantly for illustrative purposes.

PR-URL: https://github.com/nodejs/node/pull/2427
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-18 21:27:43 +02:00
Ben Noordhuis
70d1f32f56 deps: update v8 to 4.4.63.9
Upgrade the bundled V8 and update code in src/ and lib/ to the new API.

Notable backwards incompatible changes are the removal of the smalloc
module and dropped support for CESU-8 decoding.  CESU-8 support can be
brought back if necessary by doing UTF-8 decoding ourselves.

This commit includes https://codereview.chromium.org/1192973004 to fix
a build error on python 2.6 systems.  The original commit log follows:

    Use optparse in js2c.py for python compatibility

    Without this change, V8 won't build on RHEL/CentOS 6 because the
    distro python is too old to know about the argparse module.

PR-URL: https://github.com/nodejs/io.js/pull/2022
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-08-04 11:56:14 -07:00
Ben Noordhuis
e0e96acc6f test: remove smalloc add-on test
The smalloc module is about to be deprecated and removed.  Remove the
add-on test now so it's not forgotten about in the upcoming purge.

PR-URL: https://github.com/nodejs/io.js/pull/1835
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-01 23:17:52 +02:00