Skip to content

Commit

Permalink
Make IDETestContext to be a usual class to avoid copying with a diffe…
Browse files Browse the repository at this point in the history
…rent testName instead of using launch name

GitOrigin-RevId: 5bc6b1e8f8aceab3da40f0fc9287ccb5cce266ea
  • Loading branch information
MaXal authored and intellij-monorepo-bot committed Aug 31, 2023
1 parent ae6db31 commit 47741a3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import kotlin.io.path.*
import kotlin.time.Duration
import kotlin.time.Duration.Companion.minutes

data class IDETestContext(
class IDETestContext(
val paths: IDEDataPaths,
val ide: InstalledIde,
val testCase: TestCase<*>,
Expand All @@ -53,6 +53,11 @@ data class IDETestContext(
const val OPENTELEMETRY_FILE = "opentelemetry.json"
}

fun copy(ide: InstalledIde? = null, _resolvedProjectHome: Path? = null): IDETestContext {
return IDETestContext(paths, ide ?: this.ide, testCase, testName, _resolvedProjectHome ?: this._resolvedProjectHome, profilerType,
publishers, isReportPublishingEnabled, preserveSystemDir)
}

val resolvedProjectHome: Path
get() = checkNotNull(_resolvedProjectHome) { "Project directory is not specified for the test '$testName'" }

Expand Down

0 comments on commit 47741a3

Please sign in to comment.