Gradle IT: Move GradleProcessOutputInterceptor to the test framework

This is necessary to make GradleProcessOutputInterceptor available for
other tests, e.g. Gradle IT.
This commit is contained in:
Dmitriy Dolovov
2020-11-03 17:29:40 +03:00
parent fae3ba35e9
commit 4de1bf8d35
3 changed files with 3 additions and 3 deletions
@@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.idea.testFramework
package org.jetbrains.kotlin.idea.test
import com.intellij.openapi.Disposable
import com.intellij.openapi.externalSystem.model.task.ExternalSystemTaskId
@@ -12,7 +12,6 @@ import com.intellij.openapi.externalSystem.model.task.ExternalSystemTaskNotifica
import com.intellij.openapi.externalSystem.model.task.ExternalSystemTaskNotificationListener.EP_NAME as EP
import com.intellij.testFramework.ExtensionTestUtil.maskExtensions
import org.jetbrains.kotlin.idea.framework.GRADLE_SYSTEM_ID
import org.jetbrains.kotlin.idea.perf.util.gradleMessage
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
import java.lang.Exception
import kotlin.test.assertNull
@@ -49,7 +48,6 @@ private class GradleProcessOutputInterceptorImpl : GradleProcessOutputIntercepto
override fun onTaskOutput(id: ExternalSystemTaskId, text: String, stdOut: Boolean) {
if (id.projectSystemId == GRADLE_SYSTEM_ID && text.isNotEmpty()) {
gradleMessage { text }
buffer.append(text)
}
}
@@ -40,6 +40,7 @@ import org.jetbrains.kotlin.idea.perf.util.ProfileTools.Companion.enableAllInspe
import org.jetbrains.kotlin.idea.perf.util.ProfileTools.Companion.enableInspections
import org.jetbrains.kotlin.idea.perf.util.ProfileTools.Companion.enableSingleInspection
import org.jetbrains.kotlin.idea.perf.util.ProfileTools.Companion.initDefaultProfile
import org.jetbrains.kotlin.idea.test.GradleProcessOutputInterceptor
import org.jetbrains.kotlin.idea.test.invalidateLibraryCache
import org.jetbrains.kotlin.idea.testFramework.*
import org.jetbrains.kotlin.idea.testFramework.TestApplicationManager
@@ -12,6 +12,7 @@ import com.intellij.openapi.externalSystem.service.project.ExternalProjectRefres
import com.intellij.openapi.externalSystem.service.project.ProjectDataManager
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.guessProjectDir
import org.jetbrains.kotlin.idea.test.GradleProcessOutputInterceptor
import java.io.Closeable
import kotlin.test.assertFalse
import kotlin.test.fail