Skip to content

Commit

Permalink
Remove the testWithNeovim task
Browse files Browse the repository at this point in the history
Now you can just run `gradlew test -Dnvim`
  • Loading branch information
AlexPl292 committed Feb 8, 2024
1 parent ae62a9f commit cc838f6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .teamcity/_Self/buildTypes/Nvim.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object Nvim : IdeaVimBuildType({
""".trimIndent()
}
gradle {
tasks = "clean testWithNeovim"
tasks = "clean test -Dnvim"
buildFile = ""
enableStacktrace = true
}
Expand Down
10 changes: 2 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,6 @@ configurations {
}
}

// --- Compilation
// This can be moved to other test registration when issue with tests in gradle will be fixed
tasks.register<Test>("testWithNeovim") {
group = "verification"
systemProperty("ideavim.nvim.test", "true")
useJUnitPlatform()
}

tasks {
test {
// Set teamcity env variable locally to run additional tests for leaks.
Expand All @@ -174,6 +166,8 @@ tasks {
println("Set env TEAMCITY_VERSION to X to enable project leak checks from the platform")
environment("TEAMCITY_VERSION" to "X")
}

systemProperty("ideavim.nvim.test", System.getProperty("nvim") ?: false)
}

compileJava {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ object NeovimTesting {
val noBehaviourDiffers = !method.isAnnotationPresent(VimBehaviorDiffers::class.java)
val noTestingWithoutNeovim = !method.isAnnotationPresent(TestWithoutNeovim::class.java) &&
!test.javaClass.isAnnotationPresent(TestWithoutNeovim::class.java)
val neovimTestingEnabled = System.getProperty("ideavim.nvim.test", "false")!!.toBoolean()
val property = System.getProperty("ideavim.nvim.test", "false")
val neovimTestingEnabled = if (property.isBlank()) true else property.toBoolean()
val notParserTest = "org.jetbrains.plugins.ideavim.ex.parser" !in test.javaClass.packageName
val notScriptImplementation = "org.jetbrains.plugins.ideavim.ex.implementation" !in test.javaClass.packageName
val notExtension = "org.jetbrains.plugins.ideavim.extension" !in test.javaClass.packageName
Expand Down

0 comments on commit cc838f6

Please sign in to comment.