Skip to content

Commit 186eac5

Browse files
committed
Handle more RunResult statuses
1 parent e7d8c10 commit 186eac5

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

tmc-plugin/src/fi/helsinki/cs/tmc/data/ResultCollector.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public void setTestCaseResults(final ImmutableList<TestResult> results) {
5454
}
5555

5656
public void setLocalTestResults(RunResult runResult) {
57-
58-
if (runResult.status == Status.COMPILE_FAILED) {
57+
58+
if (runResult.status == Status.COMPILE_FAILED || runResult.status == Status.TESTRUN_INTERRUPTED) {
5959

6060
String STDOUT = "stdout";
6161
String STDERR = "stderr";
@@ -70,10 +70,17 @@ public void setLocalTestResults(RunResult runResult) {
7070
final String str2 = new String(logs.get(STDERR), Charset.forName("utf-8"));
7171
log.addAll(Arrays.asList(str2.split("\\r?\\n")));
7272
}
73-
73+
7474
log = tryToCleanLog(log);
75-
76-
TestResult buildFailed = new TestResult("Compilation failed", false, ImmutableList.<String>of(), "Compilation failed", ImmutableList.copyOf(log));
75+
76+
String errorType;
77+
if (runResult.status == Status.COMPILE_FAILED) {
78+
errorType = "Compilation failed";
79+
} else {
80+
errorType = "Testrun interrupted";
81+
}
82+
83+
TestResult buildFailed = new TestResult(errorType, false, ImmutableList.<String>of(), errorType, ImmutableList.copyOf(log));
7784

7885
setTestCaseResults(ImmutableList.of(buildFailed));
7986
dontWaitForValidations = true;

0 commit comments

Comments
 (0)