summaryrefslogtreecommitdiff
path: root/platform/external-system-impl/testSrc/com
diff options
context:
space:
mode:
Diffstat (limited to 'platform/external-system-impl/testSrc/com')
-rw-r--r--platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/AbstractExternalSystemTest.groovy35
-rw-r--r--platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/ExternalSystemImportingTestCase.java8
2 files changed, 25 insertions, 18 deletions
diff --git a/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/AbstractExternalSystemTest.groovy b/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/AbstractExternalSystemTest.groovy
index 37e35f1b9b76..5f5d122ba318 100644
--- a/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/AbstractExternalSystemTest.groovy
+++ b/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/AbstractExternalSystemTest.groovy
@@ -88,26 +88,29 @@ abstract class AbstractExternalSystemTest extends UsefulTestCase {
@Override
protected void tearDown() throws Exception {
- project = null
- UIUtil.invokeAndWaitIfNeeded {
- try {
- externalSystemManagerEP.unregisterExtension(externalSystemManager)
- testFixture.tearDown();
- testFixture = null;
+ try {
+ project = null
+ UIUtil.invokeAndWaitIfNeeded {
+ try {
+ externalSystemManagerEP.unregisterExtension(externalSystemManager)
+ testFixture.tearDown();
+ testFixture = null;
+ }
+ catch (Exception e) {
+ throw new RuntimeException(e);
+ }
}
- catch (Exception e) {
- throw new RuntimeException(e);
+
+ if (!FileUtil.delete(projectDir) && projectDir.exists()) {
+ System.err.println("Cannot delete " + projectDir);
+ //printDirectoryContent(myDir);
+ projectDir.deleteOnExit();
}
}
-
- if (!FileUtil.delete(projectDir) && projectDir.exists()) {
- System.err.println("Cannot delete " + projectDir);
- //printDirectoryContent(myDir);
- projectDir.deleteOnExit();
+ finally {
+ super.tearDown();
+ resetClassFields(getClass());
}
-
- super.tearDown();
- resetClassFields(getClass());
}
private void resetClassFields(@Nullable Class<?> aClass) {
diff --git a/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/ExternalSystemImportingTestCase.java b/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/ExternalSystemImportingTestCase.java
index 6107a00b7107..d55ceb0fe97c 100644
--- a/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/ExternalSystemImportingTestCase.java
+++ b/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/ExternalSystemImportingTestCase.java
@@ -157,6 +157,11 @@ public abstract class ExternalSystemImportingTestCase extends ExternalSystemTest
assertEquals(testOutput, getAbsolutePath(e.getCompilerOutputUrlForTests()));
}
+ protected void assertModuleInheritedOutput(String moduleName) {
+ CompilerModuleExtension e = getCompilerExtension(moduleName);
+ assertTrue(e.isCompilerOutputPathInherited());
+ }
+
private static String getAbsolutePath(String path) {
path = VfsUtil.urlToPath(path);
path = PathUtil.getCanonicalPath(path);
@@ -168,8 +173,7 @@ public abstract class ExternalSystemImportingTestCase extends ExternalSystemTest
}
protected CompilerModuleExtension getCompilerExtension(String module) {
- ModuleRootManager m = getRootManager(module);
- return CompilerModuleExtension.getInstance(m.getModule());
+ return CompilerModuleExtension.getInstance(getModule(module));
}
protected void assertModuleLibDep(String moduleName, String depName) {