mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
sm runner junit/testng: saving output to file
This commit is contained in:
@@ -103,15 +103,24 @@ public abstract class JavaTestFrameworkRunnableState<T extends ModuleBasedConfig
|
||||
final OSProcessHandler handler = createHandler(executor);
|
||||
consoleView.attachToProcess(handler);
|
||||
handler.addProcessListener(new ProcessAdapter() {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
if (getConfiguration().isSaveOutputToFile()) {
|
||||
viewer.getRoot().setOutputFilePath(getConfiguration().getOutputFilePath());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processTerminated(ProcessEvent event) {
|
||||
Runnable runnable = new Runnable() {
|
||||
public void run() {
|
||||
final AbstractTestProxy viewerRoot = viewer.getRoot();
|
||||
if (viewer.hasTestSuites() ||
|
||||
!ResetConfigurationModuleAdapter.tryWithAnotherModule(getConfiguration(), testConsoleProperties.isDebug())) {
|
||||
TestsUIUtil.notifyByBalloon(testConsoleProperties.getProject(), viewer.hasTestSuites(), viewer.getRoot(), testConsoleProperties, null);
|
||||
TestsUIUtil.notifyByBalloon(testConsoleProperties.getProject(), viewer.hasTestSuites(), viewerRoot, testConsoleProperties, null);
|
||||
}
|
||||
|
||||
viewerRoot.flush();
|
||||
deleteTempFiles();
|
||||
clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user