node/test/tick-processor/test-tick-processor-cpp-core.js
killagu c4716dc711 tools, test: fix prof polyfill readline
`node --prof foo.js` may not print the full profile log file, leaving
the last line broken (for example `tick,`. When that happens, `readline`
will be stuck in an infinite loop. This patch fixes it.

Also introduced `common.isCPPSymbolsNotMapped` to avoid duplicated code
on tick-processor tests.

Backport-PR-URL: https://github.com/nodejs/node/pull/18901
PR-URL: https://github.com/nodejs/node/pull/18641
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-08-16 11:38:53 +10:00

21 lines
469 B
JavaScript

'use strict';
const common = require('../common');
if (!common.enoughTestCpu)
common.skip('test is CPU-intensive');
if (common.isCPPSymbolsNotMapped) {
common.skip('C++ symbols are not mapped for this os.');
}
const base = require('./tick-processor-base.js');
base.runTest({
pattern: /RunInDebugContext/,
code: `function f() {
require('vm').runInDebugContext('Debug');
setImmediate(function() { f(); });
};
f();`
});