[tests] simplify tmp dir name in case of long name
even non-Windows systems don't want to process very long names ^KT-55750
This commit is contained in:
+3
-1
@@ -19,7 +19,9 @@ class TemporaryDirectoryManagerImpl(testServices: TestServices) : TemporaryDirec
|
||||
val testInfo = testServices.testInfo
|
||||
val className = testInfo.className
|
||||
val methodName = testInfo.methodName
|
||||
if (!onWindows) return@run KtTestUtil.tmpDirForTest(className, methodName)
|
||||
if (!onWindows && className.length + methodName.length < 255) {
|
||||
return@run KtTestUtil.tmpDirForTest(className, methodName)
|
||||
}
|
||||
|
||||
// This code will simplify directory name for windows. This is needed because there can occur errors due to long name
|
||||
val lastDot = className.lastIndexOf('.')
|
||||
|
||||
Reference in New Issue
Block a user