summaryrefslogtreecommitdiff
path: root/test/cctest/node_test_fixture.cc
AgeCommit message (Collapse)Author
2019-11-20src: add abstract `IsolatePlatformDelegate`Marcel Laverdet
Adds a new abstract class for module authors and embedders to register arbitrary isolates with `node::MultiIsolatePlatform`. PR-URL: https://github.com/nodejs/node/pull/30324 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-09test: make cctest full Node.js environmentAnna Henningsen
Make sure `node::Init()` is called once, and execute `RunBootstrapping()` so that Node’s internals are ready when the cctests run. PR-URL: https://github.com/nodejs/node/pull/26457 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-12src: trace_event: secondary storage for metadataAli Ijaz Sheikh
Metadata trace-events should be held in secondary storage so that they can be periodically reemitted. This change establishes the secondary storage and ensures that events are reemitted on each flush. PR-URL: https://github.com/nodejs/node/pull/20900 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-27test: use aliases for smart pointers in fixtureDaniel Bevenius
PR-URL: https://github.com/nodejs/node/pull/21419 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-27test: make cctest fixture use node::NewIsolateDaniel Bevenius
This commit updates the gtest fixture to use node::NewIsolate instead of creating a new V8 Isolate using v8::Isolate::New. The motivation for this is that without calling node::NewIsolate the various callbacks set on the isolate, for example AddMessageListener, SetFatalErrorHandler etc, would not get set. I don't think this is the expected behaviour and I ran into this when writing a new cctest. PR-URL: https://github.com/nodejs/node/pull/21419 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-02-06test: introduce SetUpTestCase/TearDownTestCaseDaniel Bevenius
This commit add SetUpTestCase and TearDownTestCase functions that will be called once per test case. Currently we only have SetUp/TearDown which are called for each test. This commit moves the initialization and configuration of Node and V8 to be done on a per test case basis, but gives each test a new Isolate. PR-URL: https://github.com/nodejs/node/pull/18558 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-09-13http2,async-wrap: introduce AliasedBuffer classMike Kaufman
This change introduces an AliasedBuffer class and updates asytnc-wrap and http2 to use this class. A common technique to optimize performance is to create a native buffer and then map that native buffer to user space via JS array. The runtime can efficiently write to the native buffer without having to route though JS, and the values being written are accessible from user space. While efficient, this technique allows modifications to user space memory w/out going through JS type system APIs, effectively bypassing any monitoring the JS VM has in place to track program state modifications. The result is that monitors have an incorrect view of prorgram state. The AliasedBuffer class provides a future placeholder where this technique can be used, but writes can still be observed. To achieve this, the node-chakra-core fork will add in appropriate tracking logic in the AliasedBuffer's SetValue() method. Going forward, this class can evolve to support more sophisticated mechanisms if necessary. PR-URL: https://github.com/nodejs/node/pull/15077 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-12src: make AtExit callback's per EnvironmentDaniel Bevenius
This commit attempts to address one of the TODOs in https://github.com/nodejs/node/issues/4641 regarding making the AtExit callback's per environment, instead of the current global. bnoordhuis provided a few options for solving this, and one was to use a thread-local which is what this commit attempts to do. PR-URL: https://github.com/nodejs/node/pull/9163 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2017-03-24build: enable cctest to use generated objectsDaniel Bevenius
This commit tries to make it simpler to add unit tests (cctest) for code that needs to test node core funtionality but that might not be appropriate as an addon or a JavaScript test. An example of this could be adding functionality targeted for situations when Node itself is embedded. Currently it was not as easy, or efficient, as one would have hoped to add such tests. The object output directories vary for different operating systems which we need to link to so that we don't have an additional compilation step. PR-URL: https://github.com/nodejs/node/pull/11956 Ref: https://github.com/nodejs/node/pull/9163 Reviewed-By: James M Snell <jasnell@gmail.com>