Graphs are dumped only if an env var is set

This commit is contained in:
Andrey Breslav
2011-04-05 12:15:32 +04:00
parent 5c0764f1ce
commit 803405f8dd
@@ -4,7 +4,6 @@
package org.jetbrains.jet.cfg; package org.jetbrains.jet.cfg;
import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.io.FileUtil;
import junit.framework.AssertionFailedError;
import junit.framework.Test; import junit.framework.Test;
import junit.framework.TestSuite; import junit.framework.TestSuite;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@@ -65,17 +64,13 @@ public class JetControlFlowTest extends JetTestCaseBase {
}); });
try { try {
try { processCFData(name, data);
processCFData(name, data); if ("true".equals(System.getProperty("jet.control.flow.test.dump.graphs"))) {
} catch (AssertionFailedError e) {
dumpDot(name, data.values()); dumpDot(name, data.values());
throw e;
} }
dumpDot(name, data.values());
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
private void processCFData(String name, Map<JetElement, Pseudocode> data) throws IOException { private void processCFData(String name, Map<JetElement, Pseudocode> data) throws IOException {