Skip to content

Commit 22e230f

Browse files
committed
add deleting old results to clean
1 parent 3821dfc commit 22e230f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tmc-langs-csharp/src/main/java/fi/helsinki/cs/tmc/langs/csharp/CSharpPlugin.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public Optional<ExerciseDesc> scanExercise(Path path, String exerciseName) {
143143

144144
@Override
145145
public RunResult runTests(Path path) {
146-
deleteOldResults(path);
146+
deleteResults(path);
147147

148148
ProcessRunner runner = new ProcessRunner(getTestCommand(), path);
149149

@@ -185,6 +185,8 @@ public Map<File, List<ValidationError>> getValidationErrors() {
185185

186186
@Override
187187
public void clean(Path path) {
188+
deleteResults(path);
189+
188190
try {
189191
Files.walk(path).filter(Files::isDirectory).forEach(dir -> {
190192
Path fileName = dir.getFileName();
@@ -205,7 +207,7 @@ public void clean(Path path) {
205207
}
206208
}
207209

208-
private void deleteOldResults(Path path) {
210+
private void deleteResults(Path path) {
209211
try {
210212
Files.deleteIfExists(path.resolve(".tmc_test_results.json"));
211213
} catch (Exception e) {

0 commit comments

Comments
 (0)