From a09b802d17b459ce372f34b1aa3a874895c0be38 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Thu, 16 Jun 2016 15:59:53 +0300 Subject: [PATCH] restart auto tests after automake only if some files were generated (IDEA-157550) --- .../intellij/execution/testDiscovery/JavaAutoRunManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/execution/impl/src/com/intellij/execution/testDiscovery/JavaAutoRunManager.java b/java/execution/impl/src/com/intellij/execution/testDiscovery/JavaAutoRunManager.java index a3bec0147fe9..38b333e3125a 100644 --- a/java/execution/impl/src/com/intellij/execution/testDiscovery/JavaAutoRunManager.java +++ b/java/execution/impl/src/com/intellij/execution/testDiscovery/JavaAutoRunManager.java @@ -54,22 +54,25 @@ public class JavaAutoRunManager extends AbstractAutoTestManager { public void activate() { if (myStatusListener == null) { myStatusListener = new CompilationStatusListener() { + private boolean myFoundFilesToMake = false; @Override public void compilationFinished(boolean aborted, int errors, int warnings, CompileContext compileContext) { if (errors == 0) { restartAllAutoTests(0); } myHasErrors = errors == 0; + myFoundFilesToMake = false; } @Override public void automakeCompilationFinished(int errors, int warnings, CompileContext compileContext) { + if (!myFoundFilesToMake) return; compilationFinished(false, errors, warnings, compileContext); } @Override public void fileGenerated(String outputRoot, String relativePath) { - int a = 1; + myFoundFilesToMake = true; } };