on service failed msg
This commit is contained in:
parent
0340f36564
commit
ba13602634
|
@ -12,7 +12,6 @@ import * as util from "./util.js";
|
|||
import { bash, getUUID, logError } from "./util.js";
|
||||
|
||||
const allSessions = new Set();
|
||||
const TEST_RUN_FINISHED = "Test run finished!";
|
||||
export class Session {
|
||||
get homedir() {
|
||||
return "/home/riju/src";
|
||||
|
@ -235,7 +234,6 @@ export class Session {
|
|||
break;
|
||||
}
|
||||
await this.runCode(msg.code, msg.expectedOutput);
|
||||
this.term.pty.stdin.write(TEST_RUN_FINISHED);
|
||||
break;
|
||||
case "formatCode":
|
||||
if (typeof msg.code !== "string") {
|
||||
|
|
|
@ -150,11 +150,8 @@ async function main() {
|
|||
return;
|
||||
}
|
||||
term.write(message.output);
|
||||
testData.push(message.output);
|
||||
|
||||
if (testData.join("").includes("Test run finished!")) {
|
||||
postTestResults(testData, message.expectedOutput);
|
||||
testData = [];
|
||||
if (message.expectedOutput) {
|
||||
testData.push(message.output);
|
||||
}
|
||||
return;
|
||||
case "lspStopped":
|
||||
|
@ -201,6 +198,12 @@ async function main() {
|
|||
serviceLogLines[message.service] = lines;
|
||||
return;
|
||||
case "serviceFailed":
|
||||
if (message.expectedOutput) {
|
||||
postTestResults(testData, message.expectedOutput);
|
||||
}
|
||||
|
||||
testData = [];
|
||||
|
||||
if (
|
||||
typeof message.service !== "string" ||
|
||||
typeof message.error !== "string"
|
||||
|
|
Loading…
Reference in New Issue