Skip to content

Commit

Permalink
Disable failing tests on windows.
Browse files Browse the repository at this point in the history
(cherry picked from commit 8375a8f)
  • Loading branch information
ting-yuan authored and KSP Auto Pick committed Apr 7, 2022
1 parent afd4091 commit 601584d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package com.google.devtools.ksp.test

import org.jetbrains.kotlin.test.TestMetadata
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.condition.DisabledOnOs
import org.junit.jupiter.api.condition.OS
import org.junit.jupiter.api.parallel.Execution
import org.junit.jupiter.api.parallel.ExecutionMode

Expand Down Expand Up @@ -203,6 +205,7 @@ class KSPCompilerPluginTest : AbstractKSPCompilerPluginTest() {
runTest("testData/api/functionTypes.kt")
}

@DisabledOnOs(OS.WINDOWS)
@TestMetadata("getPackage.kt")
@Test
fun testGetPackage() {
Expand Down Expand Up @@ -353,30 +356,35 @@ class KSPCompilerPluginTest : AbstractKSPCompilerPluginTest() {
runTest("testData/api/rawTypes.kt")
}

@DisabledOnOs(OS.WINDOWS)
@TestMetadata("recordJavaAnnotationTypes.kt")
@Test
fun testRecordJavaAnnotationTypes() {
runTest("testData/api/recordJavaAnnotationTypes.kt")
}

@DisabledOnOs(OS.WINDOWS)
@TestMetadata("recordJavaAsMemberOf.kt")
@Test
fun testRecordJavaAsMemberOf() {
runTest("testData/api/recordJavaAsMemberOf.kt")
}

@DisabledOnOs(OS.WINDOWS)
@TestMetadata("recordJavaGetAllMembers.kt")
@Test
fun testRecordJavaGetAllMembers() {
runTest("testData/api/recordJavaGetAllMembers.kt")
}

@DisabledOnOs(OS.WINDOWS)
@TestMetadata("recordJavaOverrides.kt")
@Test
fun testRecordJavaOverrides() {
runTest("testData/api/recordJavaOverrides.kt")
}

@DisabledOnOs(OS.WINDOWS)
@TestMetadata("recordJavaSupertypes.kt")
@Test
fun testRecordJavaSupertypes() {
Expand All @@ -401,6 +409,7 @@ class KSPCompilerPluginTest : AbstractKSPCompilerPluginTest() {
runTest("testData/api/resolveJavaType.kt")
}

@DisabledOnOs(OS.WINDOWS)
@TestMetadata("sealedClass.kt")
@Test
fun testSealedClass() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import com.google.devtools.ksp.processing.Resolver
import com.google.devtools.ksp.processing.SymbolProcessor
import com.google.devtools.ksp.symbol.KSAnnotated
import org.gradle.testkit.runner.TaskOutcome
import org.junit.Assume
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
Expand Down Expand Up @@ -120,6 +121,8 @@ class GradleCompilationTest {

@Test
fun testCommandLineArgumentProvider() {
// FIXME
Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows", ignoreCase = true))
testRule.setupAppAsAndroidApp()
testRule.appModule.addSource("Foo.kt", "class Foo")
testRule.appModule.addSource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.google.devtools.ksp.test
import org.gradle.testkit.runner.GradleRunner
import org.gradle.testkit.runner.TaskOutcome
import org.junit.Assert
import org.junit.Assume
import org.junit.Rule
import org.junit.Test
import java.io.File
Expand All @@ -14,6 +15,8 @@ class JavaOnlyIT {

@Test
fun testJavaOnly() {
// FIXME: `clean` fails to delete files on windows.
Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows", ignoreCase = true))
val gradleRunner = GradleRunner.create().withProjectDir(project.root)

gradleRunner.withArguments("assemble").build().let { result ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Artifact
import org.gradle.testkit.runner.GradleRunner
import org.gradle.testkit.runner.TaskOutcome
import org.junit.Assert
import org.junit.Assume
import org.junit.Rule
import org.junit.Test
import java.io.File
Expand Down Expand Up @@ -98,6 +99,8 @@ class OutputDepsIt {

@Test
fun testOutputDeps() {
// FIXME
Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows", ignoreCase = true))
val gradleRunner = GradleRunner.create().withProjectDir(project.root)

gradleRunner.withArguments("assemble").build().let { result ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import org.gradle.testkit.runner.BuildResult
import org.gradle.testkit.runner.GradleRunner
import org.gradle.testkit.runner.TaskOutcome
import org.junit.Assert
import org.junit.Assume
import org.junit.Rule
import org.junit.Test
import java.io.File
Expand Down Expand Up @@ -41,6 +42,8 @@ class PlaygroundIT {

@Test
fun testPlayground() {
// FIXME: `clean` fails to delete files on windows.
Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows", ignoreCase = true))
val gradleRunner = GradleRunner.create().withProjectDir(project.root)
gradleRunner.buildAndCheck("clean", "build")
gradleRunner.buildAndCheck("clean", "build")
Expand All @@ -50,6 +53,8 @@ class PlaygroundIT {
// Or use a project that depends on a builtin plugin like all-open and see if the build fails
@Test
fun testBlockOtherCompilerPlugins() {
// FIXME: `clean` fails to delete files on windows.
Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows", ignoreCase = true))
val gradleRunner = GradleRunner.create().withProjectDir(project.root)

File(project.root, "workload/build.gradle.kts")
Expand Down

0 comments on commit 601584d

Please sign in to comment.