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