test: move module out of fixture directory
tick-processor-base.js is a module used by three other tests. It is not a test fixture so move it out of the fixture directory. (One downside to having it in the fixture directory is that fixture code is not currently linted.) It is possible that the code in tick-processor-base.js should be integrated into common.js. This can potentially happen subsequently (and might make a reasonable good first contribution for a new contributor). PR-URL: https://github.com/nodejs/node/pull/9022 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
98934d29fa
commit
eb690b1335
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const common = require('../common');
|
const common = require('../common');
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
if (common.isWindows ||
|
if (common.isWindows ||
|
||||||
common.isSunOS ||
|
common.isSunOS ||
|
||||||
@ -16,7 +15,7 @@ if (!common.enoughTestCpu) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));
|
const base = require('./tick-processor-base.js');
|
||||||
|
|
||||||
base.runTest({
|
base.runTest({
|
||||||
pattern: /Builtin_DateNow/,
|
pattern: /Builtin_DateNow/,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const common = require('../common');
|
const common = require('../common');
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
if (common.isWindows ||
|
if (common.isWindows ||
|
||||||
common.isSunOS ||
|
common.isSunOS ||
|
||||||
@ -16,7 +15,7 @@ if (!common.enoughTestCpu) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));
|
const base = require('./tick-processor-base.js');
|
||||||
|
|
||||||
base.runTest({
|
base.runTest({
|
||||||
pattern: /RunInDebugContext/,
|
pattern: /RunInDebugContext/,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const common = require('../common');
|
const common = require('../common');
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
// TODO(mhdawson) Currently the test-tick-processor functionality in V8
|
// TODO(mhdawson) Currently the test-tick-processor functionality in V8
|
||||||
// depends on addresses being smaller than a full 64 bits. Aix supports
|
// depends on addresses being smaller than a full 64 bits. Aix supports
|
||||||
@ -17,7 +16,7 @@ if (!common.enoughTestCpu) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));
|
const base = require('./tick-processor-base.js');
|
||||||
|
|
||||||
// Unknown checked for to prevent flakiness, if pattern is not found,
|
// Unknown checked for to prevent flakiness, if pattern is not found,
|
||||||
// then a large number of unknown ticks should be present
|
// then a large number of unknown ticks should be present
|
||||||
|
@ -20,7 +20,7 @@ function runTest(test) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let ticks = '';
|
let ticks = '';
|
||||||
proc.stdout.on('data', chunk => ticks += chunk);
|
proc.stdout.on('data', (chunk) => ticks += chunk);
|
||||||
|
|
||||||
// Try to match after timeout
|
// Try to match after timeout
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -41,7 +41,7 @@ function match(pattern, parent, ticks) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let out = '';
|
let out = '';
|
||||||
proc.stdout.on('data', chunk => out += chunk);
|
proc.stdout.on('data', (chunk) => out += chunk);
|
||||||
proc.stdout.once('end', () => {
|
proc.stdout.once('end', () => {
|
||||||
proc.once('exit', () => {
|
proc.once('exit', () => {
|
||||||
fs.unlinkSync(LOG_FILE);
|
fs.unlinkSync(LOG_FILE);
|
Loading…
x
Reference in New Issue
Block a user