PerfTests gradle interceptor clean up
This commit is contained in:
+10
-12
@@ -38,18 +38,17 @@ class HighlightWholeProjectPerformanceTest : UsefulTestCase() {
|
||||
fun testHighlightAllKtFilesInProject() {
|
||||
val emptyProfile = System.getProperty("emptyProfile", "false").toBoolean()
|
||||
val projectSpecs = projectSpecs()
|
||||
for (projectSpec in projectSpecs) {
|
||||
val projectName = projectSpec.name
|
||||
val projectPath = projectSpec.path
|
||||
suite(suiteName = "allKtFilesInProject") {
|
||||
app {
|
||||
warmUpProject()
|
||||
|
||||
suite(suiteName = "$projectName project") {
|
||||
app {
|
||||
warmUpProject()
|
||||
|
||||
with(config) {
|
||||
warmup = 1
|
||||
iterations = 3
|
||||
}
|
||||
with(config) {
|
||||
warmup = 1
|
||||
iterations = 3
|
||||
}
|
||||
for (projectSpec in projectSpecs) {
|
||||
val projectName = projectSpec.name
|
||||
val projectPath = projectSpec.path
|
||||
|
||||
try {
|
||||
project(ExternalProject(projectPath, ProjectOpenAction.GRADLE_PROJECT), refresh = true) {
|
||||
@@ -93,7 +92,6 @@ class HighlightWholeProjectPerformanceTest : UsefulTestCase() {
|
||||
// nothing as it is already caught by perfTest
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.io.PrintWriter
|
||||
import java.io.StringWriter
|
||||
|
||||
inline fun gradleMessage(block: () -> String) {
|
||||
//print("#gradle ${block()}")
|
||||
print("#gradle ${block()}")
|
||||
}
|
||||
|
||||
inline fun logMessage(message: () -> String) {
|
||||
|
||||
+4
-1
@@ -24,8 +24,11 @@ interface GradleProcessOutputInterceptor {
|
||||
fun install(parentDisposable: Disposable) {
|
||||
val installedExtensions = EP.extensions
|
||||
|
||||
val actual = installedExtensions.firstIsInstanceOrNull<GradleProcessOutputInterceptor>()
|
||||
if (actual is GradleProcessOutputInterceptorImpl) return
|
||||
|
||||
assertNull(
|
||||
installedExtensions.firstIsInstanceOrNull<GradleProcessOutputInterceptor>(),
|
||||
actual,
|
||||
"Another ${GradleProcessOutputInterceptor::class.java.simpleName} is already installed"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user