Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
test: skip tests for ChakraCore that depend on V8
Browse files Browse the repository at this point in the history
Some tests check for the ChakraCore engine at runtime to skip, since
these tests depend on V8 features. This commit adds those tests to the
.status files, so they aren't started at all.

PR-URL: #436
Refs: #426
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Jack Horton <jahorto@microsoft.com>
  • Loading branch information
jaimecbernardo authored and joaocgreis committed Dec 6, 2017
1 parent f588241 commit 5adda3a
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 47 deletions.
24 changes: 24 additions & 0 deletions test/abort/abort.status
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
prefix abort

# To mark a test as flaky, list the test name in the appropriate section
# below, without ".js", followed by ": PASS,FLAKY". Example:
# sample-test : PASS,FLAKY

[true] # This section applies to all platforms

[$system==win32]

[$system==linux]

[$system==macos]

[$system==solaris]

[$system==freebsd]

[$system==aix]

[$jsEngine==chakracore]
# This test is disabled for chakra engine because it depends
# on v8-option --abort-on-uncaught-exception
test-abort-uncaught-exception : SKIP
6 changes: 0 additions & 6 deletions test/abort/test-abort-uncaught-exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ const assert = require('assert');
const spawn = require('child_process').spawn;
const node = process.execPath;

if (common.isChakraEngine) {
common.skip('This test is disabled for chakra engine because it depends ' +
'on v8-option --abort-on-uncaught-exception');
return;
}

if (process.argv[2] === 'child') {
throw new Error('child error');
} else {
Expand Down
5 changes: 5 additions & 0 deletions test/addons/addon.status
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ hello-world-esm/test : SKIP
new-target/test : SKIP
callback-scope/test : SKIP
callback-scope/test-resolve-async : SKIP

# This test is disabled for chakra engine because it depends
# on v8 GC behavior. Chakra GC may find reference-like data
# on native stack and may not do the GC as expected.
null-buffer-neuter/test : SKIP
7 changes: 0 additions & 7 deletions test/addons/null-buffer-neuter/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,4 @@
const common = require('../../common');
const binding = require(`./build/${common.buildType}/binding`);

if (common.isChakraEngine) {
common.skip('This test is disabled for chakra engine because it depends ' +
'on v8 GC behavior. Chakra GC may find reference-like data ' +
'on native stack and may not do the GC as expected.');
return;
}

binding.run();
4 changes: 4 additions & 0 deletions test/async-hooks/async-hooks.status
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ prefix async-hooks
test-promise : SKIP
test-promise.chain-promise-before-init-hooks : SKIP
test-promise.promise-before-init-hooks : SKIP

# This test is disabled for chakra engine because it depends
# on v8-option --abort-on-uncaught-exception
test-callback-error : SKIP
6 changes: 0 additions & 6 deletions test/async-hooks/test-callback-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ const { spawnSync, fork } = require('child_process');
const async_hooks = require('async_hooks');
const initHooks = require('./init-hooks');

if (common.isChakraEngine) {
common.skip('This test is disabled for chakra engine because it depends ' +
'on v8-option --abort-on-uncaught-exception');
return;
}

const arg = process.argv[2];
switch (arg) {
case 'test_init_callback':
Expand Down
15 changes: 15 additions & 0 deletions test/parallel/parallel.status
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,21 @@ test-vm-strict-assign : SKIP
# https://github.com/nodejs/node-chakracore/issues/395
test-zlib-empty-buffer : SKIP

# These tests are disabled for chakra engine because they depend
# on v8-option --abort-on-uncaught-exception
test-domain-throw-error-then-throw-from-uncaught-exception-handler : SKIP
test-domain-with-abort-on-uncaught-exception : SKIP

# These tests are disabled for chakra engine because they depend
# on v8 flag --allow_natives_syntax
test-v8-flags : SKIP
test-v8-version-tag : SKIP

# This test is disabled for chakra engine because it depends
# on v8-option --max-old-space-size
test-windows-failed-heap-allocation : SKIP


[$jsEngine==chakracore && $arch==x64]
# These tests are failing for Node-Chakracore and should eventually be fixed
test-buffer-includes : SKIP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ const assert = require('assert');
const child_process = require('child_process');
const domain = require('domain');

if (common.isChakraEngine) {
common.skip('This test is disabled for chakra engine because it depends ' +
'on v8-option --abort-on-uncaught-exception');
return;
}

const uncaughtExceptionHandlerErrMsg = 'boom from uncaughtException handler';
const domainErrMsg = 'boom from domain';

Expand Down
6 changes: 0 additions & 6 deletions test/parallel/test-domain-with-abort-on-uncaught-exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ const fs = require('fs');
* not --abort_on_uncaught_exception is passed on the command line.
*/

if (common.isChakraEngine) {
common.skip('This test is disabled for chakra engine because it depends ' +
'on v8-option --abort-on-uncaught-exception');
return;
}

const domainErrHandlerExMessage = 'exception from domain error handler';

if (process.argv[2] === 'child') {
Expand Down
7 changes: 1 addition & 6 deletions test/parallel/test-v8-flags.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
'use strict';
const common = require('../common');
require('../common');
const assert = require('assert');
const v8 = require('v8');
const vm = require('vm');

if (common.isChakraEngine) {
common.skip('This test is disabled for chakra engine.');
return;
}

// Note: changing V8 flags after an isolate started is not guaranteed to work.
// Specifically here, V8 may cache compiled scripts between the flip of the
// flag. We use a different script each time to work around this problem.
Expand Down
7 changes: 1 addition & 6 deletions test/parallel/test-v8-version-tag.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
'use strict';
const common = require('../common');
require('../common');
const assert = require('assert');
const v8 = require('v8');

if (common.isChakraEngine) {
common.skip('This test is disabled for chakra engine.');
return;
}

const versionTag1 = v8.cachedDataVersionTag();
assert.strictEqual(typeof versionTag1, 'number');
assert.strictEqual(v8.cachedDataVersionTag(), versionTag1);
Expand Down
4 changes: 0 additions & 4 deletions test/parallel/test-windows-failed-heap-allocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ const common = require('../common');

if (!common.isWindows) return common.skip('Windows-only');

if (common.isChakraEngine)
common.skip('This test is disabled for chakra engine because it depends ' +
'on v8-option --max-old-space-size');

const assert = require('assert');
const { exec } = require('child_process');

Expand Down

0 comments on commit 5adda3a

Please sign in to comment.