Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ exports.isLinux = process.platform === 'linux';
exports.isOSX = process.platform === 'darwin';

exports.enoughTestMem = os.totalmem() > 0x40000000; /* 1 Gb */

const cpus = os.cpus();
exports.enoughTestCpu = cpus.length > 1 || cpus[0].speed > 999;

exports.rootDir = exports.isWindows ? 'c:\\' : '/';

function rimrafSync(p) {
Expand Down
4 changes: 0 additions & 4 deletions test/parallel/parallel.status
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ prefix parallel
[$system==win32]

[$system==linux]
test-tick-processor : PASS,FLAKY

[$system==macos]

[$arch==arm || $arch==arm64]
test-tick-processor-builtin : PASS,FLAKY
test-tick-processor-cpp-core : PASS,FLAKY
test-tick-processor-unknown : PASS,FLAKY

[$system==solaris] # Also applies to SmartOS

Expand Down
19 changes: 7 additions & 12 deletions test/parallel/test-tick-processor-builtin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
const common = require('../common');
const path = require('path');

// TODO(mhdawson) Currently the test-tick-processor functionality in V8
// depends on addresses being smaller than a full 64 bits. Aix supports
// the full 64 bits and the result is that it does not process the
// addresses correctly and runs out of memory
// Disabling until we get a fix upstreamed into V8
if (common.isAix) {
common.skip('Aix address range too big for scripts.');
return;
}

const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));

if (common.isWindows ||
common.isSunOS ||
common.isAix ||
Expand All @@ -23,6 +11,13 @@ if (common.isWindows ||
return;
}

if (!common.enoughTestCpu) {
common.skip('test is CPU-intensive');
return;
}

const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));

base.runTest({
pattern: /Builtin_DateNow/,
code: `function f() {
Expand Down
19 changes: 7 additions & 12 deletions test/parallel/test-tick-processor-cpp-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
const common = require('../common');
const path = require('path');

// TODO(mhdawson) Currently the test-tick-processor functionality in V8
// depends on addresses being smaller than a full 64 bits. Aix supports
// the full 64 bits and the result is that it does not process the
// addresses correctly and runs out of memory
// Disabling until we get a fix upstreamed into V8
if (common.isAix) {
common.skip('Aix address range too big for scripts.');
return;
}

const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));

if (common.isWindows ||
common.isSunOS ||
common.isAix ||
Expand All @@ -23,6 +11,13 @@ if (common.isWindows ||
return;
}

if (!common.enoughTestCpu) {
common.skip('test is CPU-intensive');
return;
}

const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));

base.runTest({
pattern: /RunInDebugContext/,
code: `function f() {
Expand Down
5 changes: 5 additions & 0 deletions test/parallel/test-tick-processor-unknown.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ if (common.isAix) {
return;
}

if (!common.enoughTestCpu) {
common.skip('test is CPU-intensive');
return;
}

const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));

// Unknown checked for to prevent flakiness, if pattern is not found,
Expand Down