-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract a convention plugin for testing
- Loading branch information
Showing
6 changed files
with
61 additions
and
30 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
build-logic/src/main/kotlin/org/jetbrains/conventions/base-unit-test.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.jetbrains.conventions | ||
|
||
/** | ||
* Utility to run ynit tests for K1 and K2 (analysis API). | ||
*/ | ||
|
||
plugins { | ||
id("org.jetbrains.conventions.base") | ||
id("org.jetbrains.conventions.base-java") | ||
} | ||
|
||
val descriptorsTestConfiguration: Configuration by configurations.creating { | ||
extendsFrom(configurations.testImplementation.get()) | ||
} | ||
val symbolsTestConfiguration: Configuration by configurations.creating { | ||
extendsFrom(configurations.testImplementation.get()) | ||
} | ||
|
||
val symbolsTest = tasks.register<Test>("symbolsTest") { | ||
useJUnitPlatform { | ||
excludeTags("onlyDescriptors", "onlyDescriptorsMPP", "javaCode", "usingJDK") | ||
} | ||
classpath += symbolsTestConfiguration | ||
} | ||
// run symbols and descriptors tests | ||
tasks.test { | ||
//enabled = false | ||
classpath += descriptorsTestConfiguration | ||
dependsOn(symbolsTest) | ||
} | ||
|
||
val descriptorsTest = tasks.register<Test>("descriptorsTest") { | ||
classpath += descriptorsTestConfiguration | ||
} | ||
|
||
tasks.check { | ||
dependsOn(symbolsTest) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters