Skip to content

Commit

Permalink
avoid failing KotlinGradleIT.testInternalTest for Windows agent
Browse files Browse the repository at this point in the history
  • Loading branch information
nav-nav committed Nov 5, 2020
1 parent c839282 commit 45ce0c6
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import org.jetbrains.kotlin.gradle.util.*
import org.jetbrains.kotlin.test.KotlinTestUtils
import org.junit.Test
import java.io.File
import java.nio.file.FileSystemException
import java.nio.file.Files
import java.util.zip.ZipFile
import kotlin.test.assertEquals
Expand Down Expand Up @@ -692,7 +693,12 @@ class KotlinGradleIT : BaseGradleIT() {
val buildDir = projectDir.resolve("build")
buildDir.deleteRecursively()
val externalBuildDir = Files.createTempDirectory(workingDir.toPath(), "externalBuild")
Files.createSymbolicLink(buildDir.toPath(), externalBuildDir)
try {
Files.createSymbolicLink(buildDir.toPath(), externalBuildDir)
} catch (_: FileSystemException) {
//Windows requires SeSymbolicLink privilege and we can't grant it
null
} ?: return@with

build("build") {
assertSuccessful()
Expand Down

0 comments on commit 45ce0c6

Please sign in to comment.