Rename tmpDirForReusableLibrary -> tmpDirForReusableFolder
This commit is contained in:
@@ -119,7 +119,7 @@ public class KotlinTestUtils {
|
||||
|
||||
static {
|
||||
try {
|
||||
IDEA_SYSTEM_PATH = tmpDirForReusableLibrary("idea-system").getPath();
|
||||
IDEA_SYSTEM_PATH = tmpDirForReusableFolder("idea-system").getPath();
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
@@ -442,7 +442,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));
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ object MockLibraryUtil {
|
||||
useJava9: Boolean = false
|
||||
): File {
|
||||
return compileLibraryToJar(
|
||||
sourcesPath, KotlinTestUtils.tmpDirForReusableLibrary("testLibrary-" + jarName), jarName, addSources, allowKotlinSources, extraOptions, extraClasspath
|
||||
sourcesPath, KotlinTestUtils.tmpDirForReusableFolder("testLibrary-" + jarName), jarName, addSources, allowKotlinSources, extraOptions, extraClasspath
|
||||
, useJava9)}
|
||||
|
||||
@JvmStatic
|
||||
@@ -127,7 +127,7 @@ object MockLibraryUtil {
|
||||
|
||||
@JvmStatic
|
||||
fun compileJsLibraryToJar(sourcesPath: String, jarName: String, addSources: Boolean, extraOptions: List<String> = emptyList()): File {
|
||||
val contentDir = KotlinTestUtils.tmpDirForReusableLibrary("testLibrary-" + jarName)
|
||||
val contentDir = KotlinTestUtils.tmpDirForReusableFolder("testLibrary-" + jarName)
|
||||
|
||||
val outDir = File(contentDir, "out")
|
||||
val outputFile = File(outDir, jarName + ".js")
|
||||
|
||||
@@ -332,7 +332,7 @@ abstract class AbstractScriptConfigurationTest : KotlinCompletionTestCase() {
|
||||
|
||||
private fun compileLibToDir(srcDir: File, vararg classpath: String): File {
|
||||
//TODO: tmpDir would be enough, but there is tricky fail under AS otherwise
|
||||
val outDir = KotlinTestUtils.tmpDirForReusableLibrary("${getTestName(false)}${srcDir.name}Out")
|
||||
val outDir = KotlinTestUtils.tmpDirForReusableFolder("${getTestName(false)}${srcDir.name}Out")
|
||||
|
||||
val kotlinSourceFiles = FileUtil.findFilesByMask(Pattern.compile(".+\\.kt$"), srcDir)
|
||||
if (kotlinSourceFiles.isNotEmpty()) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.io.File
|
||||
class ScriptEngineV8 : ScriptEngine {
|
||||
companion object {
|
||||
// It's important that this is not created per test, but rather per process.
|
||||
val LIBRARY_PATH_BASE = KotlinTestUtils.tmpDirForReusableLibrary("j2v8_library_path").path
|
||||
val LIBRARY_PATH_BASE = KotlinTestUtils.tmpDirForReusableFolder("j2v8_library_path").path
|
||||
}
|
||||
|
||||
override fun <T> releaseObject(t: T) {
|
||||
|
||||
Reference in New Issue
Block a user