fix for output file by short name inside working dir (IDEA-153832)
[idea/community.git] / java / execution / impl / src / com / intellij / execution / JavaTestFrameworkRunnableState.java
index f07cb5301613691e6cef6c9556126cd28aa96feb..dd5d7148e811fb56989ff8f15db16fd47c1d4d1b 100644 (file)
@@ -17,6 +17,7 @@ package com.intellij.execution;
 
 import com.intellij.ExtensionPoints;
 import com.intellij.debugger.impl.GenericDebuggerRunnerSettings;
+import com.intellij.diagnostic.logging.OutputFileUtil;
 import com.intellij.execution.configurations.*;
 import com.intellij.execution.process.OSProcessHandler;
 import com.intellij.execution.process.ProcessAdapter;
@@ -124,7 +125,8 @@ public abstract class JavaTestFrameworkRunnableState<T extends ModuleBasedConfig
       @Override
       public void startNotified(ProcessEvent event) {
         if (getConfiguration().isSaveOutputToFile()) {
-          root.setOutputFilePath(getConfiguration().getOutputFilePath());
+          final File file = OutputFileUtil.getOutputFile(getConfiguration());
+          root.setOutputFilePath(file != null ? file.getAbsolutePath() : null);
         }
       }