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

Commit 5adda3a

Browse files
jaimecbernardojoaocgreis
authored andcommitted
test: skip tests for ChakraCore that depend on V8
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 <[email protected]> Reviewed-By: Jack Horton <[email protected]>
1 parent f588241 commit 5adda3a

12 files changed

+50
-47
lines changed

Diff for: test/abort/abort.status

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
prefix abort
2+
3+
# To mark a test as flaky, list the test name in the appropriate section
4+
# below, without ".js", followed by ": PASS,FLAKY". Example:
5+
# sample-test : PASS,FLAKY
6+
7+
[true] # This section applies to all platforms
8+
9+
[$system==win32]
10+
11+
[$system==linux]
12+
13+
[$system==macos]
14+
15+
[$system==solaris]
16+
17+
[$system==freebsd]
18+
19+
[$system==aix]
20+
21+
[$jsEngine==chakracore]
22+
# This test is disabled for chakra engine because it depends
23+
# on v8-option --abort-on-uncaught-exception
24+
test-abort-uncaught-exception : SKIP

Diff for: test/abort/test-abort-uncaught-exception.js

-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ const assert = require('assert');
55
const spawn = require('child_process').spawn;
66
const node = process.execPath;
77

8-
if (common.isChakraEngine) {
9-
common.skip('This test is disabled for chakra engine because it depends ' +
10-
'on v8-option --abort-on-uncaught-exception');
11-
return;
12-
}
13-
148
if (process.argv[2] === 'child') {
159
throw new Error('child error');
1610
} else {

Diff for: test/addons/addon.status

+5
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ hello-world-esm/test : SKIP
2525
new-target/test : SKIP
2626
callback-scope/test : SKIP
2727
callback-scope/test-resolve-async : SKIP
28+
29+
# This test is disabled for chakra engine because it depends
30+
# on v8 GC behavior. Chakra GC may find reference-like data
31+
# on native stack and may not do the GC as expected.
32+
null-buffer-neuter/test : SKIP

Diff for: test/addons/null-buffer-neuter/test.js

-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,4 @@
44
const common = require('../../common');
55
const binding = require(`./build/${common.buildType}/binding`);
66

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

Diff for: test/async-hooks/async-hooks.status

+4
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ prefix async-hooks
2323
test-promise : SKIP
2424
test-promise.chain-promise-before-init-hooks : SKIP
2525
test-promise.promise-before-init-hooks : SKIP
26+
27+
# This test is disabled for chakra engine because it depends
28+
# on v8-option --abort-on-uncaught-exception
29+
test-callback-error : SKIP

Diff for: test/async-hooks/test-callback-error.js

-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ const { spawnSync, fork } = require('child_process');
55
const async_hooks = require('async_hooks');
66
const initHooks = require('./init-hooks');
77

8-
if (common.isChakraEngine) {
9-
common.skip('This test is disabled for chakra engine because it depends ' +
10-
'on v8-option --abort-on-uncaught-exception');
11-
return;
12-
}
13-
148
const arg = process.argv[2];
159
switch (arg) {
1610
case 'test_init_callback':

Diff for: test/parallel/parallel.status

+15
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,21 @@ test-vm-strict-assign : SKIP
116116
# https://github.com/nodejs/node-chakracore/issues/395
117117
test-zlib-empty-buffer : SKIP
118118

119+
# These tests are disabled for chakra engine because they depend
120+
# on v8-option --abort-on-uncaught-exception
121+
test-domain-throw-error-then-throw-from-uncaught-exception-handler : SKIP
122+
test-domain-with-abort-on-uncaught-exception : SKIP
123+
124+
# These tests are disabled for chakra engine because they depend
125+
# on v8 flag --allow_natives_syntax
126+
test-v8-flags : SKIP
127+
test-v8-version-tag : SKIP
128+
129+
# This test is disabled for chakra engine because it depends
130+
# on v8-option --max-old-space-size
131+
test-windows-failed-heap-allocation : SKIP
132+
133+
119134
[$jsEngine==chakracore && $arch==x64]
120135
# These tests are failing for Node-Chakracore and should eventually be fixed
121136
test-buffer-includes : SKIP

Diff for: test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js

-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ const assert = require('assert');
1010
const child_process = require('child_process');
1111
const domain = require('domain');
1212

13-
if (common.isChakraEngine) {
14-
common.skip('This test is disabled for chakra engine because it depends ' +
15-
'on v8-option --abort-on-uncaught-exception');
16-
return;
17-
}
18-
1913
const uncaughtExceptionHandlerErrMsg = 'boom from uncaughtException handler';
2014
const domainErrMsg = 'boom from domain';
2115

Diff for: test/parallel/test-domain-with-abort-on-uncaught-exception.js

-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ const fs = require('fs');
2626
* not --abort_on_uncaught_exception is passed on the command line.
2727
*/
2828

29-
if (common.isChakraEngine) {
30-
common.skip('This test is disabled for chakra engine because it depends ' +
31-
'on v8-option --abort-on-uncaught-exception');
32-
return;
33-
}
34-
3529
const domainErrHandlerExMessage = 'exception from domain error handler';
3630

3731
if (process.argv[2] === 'child') {

Diff for: test/parallel/test-v8-flags.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
'use strict';
2-
const common = require('../common');
2+
require('../common');
33
const assert = require('assert');
44
const v8 = require('v8');
55
const vm = require('vm');
66

7-
if (common.isChakraEngine) {
8-
common.skip('This test is disabled for chakra engine.');
9-
return;
10-
}
11-
127
// Note: changing V8 flags after an isolate started is not guaranteed to work.
138
// Specifically here, V8 may cache compiled scripts between the flip of the
149
// flag. We use a different script each time to work around this problem.

Diff for: test/parallel/test-v8-version-tag.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
'use strict';
2-
const common = require('../common');
2+
require('../common');
33
const assert = require('assert');
44
const v8 = require('v8');
55

6-
if (common.isChakraEngine) {
7-
common.skip('This test is disabled for chakra engine.');
8-
return;
9-
}
10-
116
const versionTag1 = v8.cachedDataVersionTag();
127
assert.strictEqual(typeof versionTag1, 'number');
138
assert.strictEqual(v8.cachedDataVersionTag(), versionTag1);

Diff for: test/parallel/test-windows-failed-heap-allocation.js

-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ const common = require('../common');
55

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

8-
if (common.isChakraEngine)
9-
common.skip('This test is disabled for chakra engine because it depends ' +
10-
'on v8-option --max-old-space-size');
11-
128
const assert = require('assert');
139
const { exec } = require('child_process');
1410

0 commit comments

Comments
 (0)