Skip to content
Open
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
7 changes: 4 additions & 3 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ exports.projectDir = path.join(__dirname, '..');

exports.core = path.join(os.tmpdir(), 'core');
exports.promptDelay = 200;
exports.testTimeout = parseInt(process.env.TEST_TIMEOUT) || 40000;
exports.testTimeoutLong = parseInt(process.env.TEST_TIMEOUT_LONG) || 60000;

function llnodeDebug() {
// Node v4.x does not support rest
Expand Down Expand Up @@ -170,7 +172,6 @@ SessionOutput.prototype.linesUntil = function linesUntil(regexp, callback) {

function Session(options) {
EventEmitter.call(this);
const timeout = parseInt(process.env.TEST_TIMEOUT) || 40000;
const lldbBin = process.env.TEST_LLDB_BINARY || 'lldb';
const env = Object.assign({}, process.env);

Expand Down Expand Up @@ -205,8 +206,8 @@ function Session(options) {
this.lldb.stdin.write(`target create "${options.executable}"` +
` --core "${options.core}"\n`);
}
this.stdout = new SessionOutput(this, this.lldb.stdout, timeout);
this.stderr = new SessionOutput(this, this.lldb.stderr, timeout);
this.stdout = new SessionOutput(this, this.lldb.stdout, exports.testTimeout);
this.stderr = new SessionOutput(this, this.lldb.stderr, exports.testTimeout);

// Map these methods to stdout for compatibility with legacy tests.
this.wait = SessionOutput.prototype.wait.bind(this.stdout);
Expand Down
2 changes: 1 addition & 1 deletion test/plugin/frame-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async function testFrameList(t, sess, frameNumber, sourceCode, cb) {
}

tape('v8 stack', async (t) => {
t.timeoutAfter(30000);
t.timeoutAfter(common.testTimeout);

const sess = common.Session.create('frame-scenario.js');
sess.waitBreak = promisify(sess.waitBreak);
Expand Down
2 changes: 1 addition & 1 deletion test/plugin/inspect-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ function verifyInvalidExpr(t, sess) {
}

tape('v8 inspect', (t) => {
t.timeoutAfter(30000);
t.timeoutAfter(common.testTimeout);

const sess = common.Session.create('inspect-scenario.js');

Expand Down
2 changes: 1 addition & 1 deletion test/plugin/stack-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const tape = require('tape');
const common = require('../common');

tape('v8 stack', (t) => {
t.timeoutAfter(45000);
t.timeoutAfter(common.testTimeoutLong);

const sess = common.Session.create('stack-scenario.js');
sess.waitBreak(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/plugin/usage-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function containsLine(lines, re) {
}

tape('usage messages', (t) => {
t.timeoutAfter(30000);
t.timeoutAfter(common.testTimeout);

const sess = common.Session.create('inspect-scenario.js');

Expand Down
2 changes: 1 addition & 1 deletion test/plugin/workqueue-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function testWorkqueueCommands(t, sess) {
}

tape('v8 workqueue commands', (t) => {
t.timeoutAfter(60000);
t.timeoutAfter(common.testTimeoutLong);

const sess = common.Session.create('workqueue-scenario.js');
sess.timeoutAfter
Expand Down