Skip to content

Commit

Permalink
Add wrappers to run JaConTeBe
Browse files Browse the repository at this point in the history
  • Loading branch information
aoli-al committed May 3, 2024
1 parent 047ddc6 commit 6a0461f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ tasks.withType<JavaExec> {
jvmArgs("-agentpath:$agentPath")
jvmArgs("-javaagent:${instrumentation.layout.buildDirectory.get().asFile}/libs/${instrumentation.name}-${instrumentation.version}-all.jar")
jvmArgs("-ea")
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
doFirst {
// Printing the full command
println("Executing command: ${executable} ${jvmArgs!!.joinToString(" ")} -cp ${classpath.asPath} ${mainClass.get()} ${args!!.joinToString(" ")}")
Expand All @@ -52,14 +53,25 @@ tasks.register<JavaExec>("replay") {
args = listOf("cmu.pasta.fray.benchmark.$main", "main", "-o", "/tmp/report", "--logger", "csv", "--iter", "10000") + extraArgs
}

tasks.register<JavaExec>("runJC") {
val cp = properties["classpath"] as String? ?: ""
val main = properties["mainClass"] as String? ?: ""
val extraArgs = when (val extraArgs = properties["extraArgs"]) {
is String -> extraArgs.split(" ")
else -> emptyList()
}
classpath += files(cp.split(":"))
args = listOf(main, "main", "-o", "${layout.buildDirectory.get().asFile}/report", "--logger", "csv", "--iter", "10000") + extraArgs
}

tasks.register<JavaExec>("runSCT") {
val cp = properties["classpath"] as String? ?: ""
val main = properties["mainClass"] as String? ?: ""
val extraArgs = when (val extraArgs = properties["extraArgs"]) {
is String -> extraArgs.split(" ")
else -> emptyList()
}
classpath += files(cp)
classpath += files(cp.split(":"))
args = listOf("cmu.pasta.sfuzz.benchmark.$main", "main", "-o", "${layout.buildDirectory.get().asFile}/report", "--logger", "csv", "--iter", "10000") + extraArgs
}

Expand Down

0 comments on commit 6a0461f

Please sign in to comment.