Minor. Fix AS32 compilation
This commit is contained in:
@@ -90,6 +90,8 @@ import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static com.intellij.openapi.application.PathManager.PROPERTY_CONFIG_PATH;
|
||||
import static com.intellij.openapi.application.PathManager.PROPERTY_SYSTEM_PATH;
|
||||
import static org.jetbrains.kotlin.test.InTextDirectivesUtils.*;
|
||||
|
||||
public class KotlinTestUtils {
|
||||
@@ -109,6 +111,19 @@ public class KotlinTestUtils {
|
||||
|
||||
private static final List<File> filesToDelete = new ArrayList<>();
|
||||
|
||||
// It's important that this is not created per test, but rather per process.
|
||||
public static final String IDEA_SYSTEM_PATH;
|
||||
|
||||
static {
|
||||
try {
|
||||
IDEA_SYSTEM_PATH = tmpDirForReusableFolder("idea-system").getPath();
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Syntax:
|
||||
*
|
||||
@@ -424,7 +439,7 @@ public class KotlinTestUtils {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static File tmpDirForReusableLibrary(String name) throws IOException {
|
||||
public static File tmpDirForReusableFolder(String name) throws IOException {
|
||||
return normalizeFile(FileUtil.createTempDirectory(new File(System.getProperty("java.io.tmpdir")), name, "", true));
|
||||
}
|
||||
|
||||
@@ -1272,4 +1287,9 @@ public class KotlinTestUtils {
|
||||
// Several extension if name contains another dot
|
||||
return name.indexOf('.', firstDotIndex + 1) != -1;
|
||||
}
|
||||
|
||||
public static void setIdeaSystemPathProperties() {
|
||||
System.setProperty(PROPERTY_SYSTEM_PATH, IDEA_SYSTEM_PATH);
|
||||
System.setProperty(PROPERTY_CONFIG_PATH, IDEA_SYSTEM_PATH + "/config");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user