Fail tests on bad exit status
This commit is contained in:
parent
9af303729f
commit
f9423f1482
|
@ -69,6 +69,7 @@ export class Session {
|
|||
event: "serviceFailed",
|
||||
service: "container",
|
||||
error: `Exited with status ${signal || code}`,
|
||||
code: signal || code,
|
||||
})
|
||||
);
|
||||
containerPty.on("error", (err) =>
|
||||
|
@ -121,6 +122,7 @@ export class Session {
|
|||
event: "serviceFailed",
|
||||
service: "daemon",
|
||||
error: `Exited with status ${signal || code}`,
|
||||
code: signal || code,
|
||||
})
|
||||
);
|
||||
daemonProc.on("error", (err) =>
|
||||
|
@ -158,6 +160,7 @@ export class Session {
|
|||
event: "serviceFailed",
|
||||
service: "lsp",
|
||||
error: `Exited with status ${signal || code}`,
|
||||
code: signal || code,
|
||||
})
|
||||
);
|
||||
lspProc.on("error", (err) =>
|
||||
|
@ -349,6 +352,7 @@ export class Session {
|
|||
event: "serviceFailed",
|
||||
service: "terminal",
|
||||
error: `Exited with status ${signal || code}`,
|
||||
code: signal || code,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -407,6 +411,7 @@ export class Session {
|
|||
event: "serviceFailed",
|
||||
service: "formatter",
|
||||
error: `Exited with status ${signal || code}`,
|
||||
code: signal || code,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -220,6 +220,16 @@ class Test {
|
|||
sendInput(this.send, this.config.helloInput);
|
||||
}
|
||||
await this.waitForOutput(pattern, this.config.helloMaxLength);
|
||||
if (!this.config.repl) {
|
||||
await this.wait("termination", (msg) => {
|
||||
if (msg.event === "serviceFailed") {
|
||||
if (msg.code !== 0) {
|
||||
throw new Error(`run failed with code ${msg.code}`);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
testRepl = async () => {
|
||||
const input = this.config.input || "123 * 234";
|
||||
|
|
Loading…
Reference in New Issue