Skip to content

Commit

Permalink
[perf-tests] fix tests on startup, get an option used in tests correctly
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 9ed124d8f9c5f965fa7723e474debe99dc574b86
  • Loading branch information
annaMarchenkoJetBrains authored and intellij-monorepo-bot committed Sep 5, 2023
1 parent 50b6655 commit 5cb082b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,14 @@ data class VMOptions(
return data.any { it.contains(option) }
}

fun getOption(option: String): String {
data.forEach { line ->
if (line.contains(option)) {
return line.replace("-D$option=", "")
}
}
error("There is no such option")
}

fun isUnderDebug(): Boolean = ManagementFactory.getRuntimeMXBean().inputArguments.any { it.startsWith("-agentlib:jdwp") }
}

0 comments on commit 5cb082b

Please sign in to comment.