[K/N] Add RosettaExecutor
Merge-request: KT-MR-9986 Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
917f64c893
commit
142e2b4b2a
@@ -53,7 +53,7 @@ private fun Executor.service(project: Project) = object: ExecutorService {
|
||||
val execSpec = project.objects.newInstance<DefaultExecSpec>().apply {
|
||||
action.execute(this)
|
||||
}
|
||||
val request = executeRequest(
|
||||
val request = ExecuteRequest(
|
||||
executableAbsolutePath = execSpec.executable,
|
||||
args = execSpec.args,
|
||||
).apply {
|
||||
@@ -105,6 +105,7 @@ fun create(project: Project): ExecutorService {
|
||||
}
|
||||
}.service(project)
|
||||
supportsRunningTestsOnDevice(testTarget) -> deviceLauncher(project)
|
||||
configurables is AppleConfigurables && RosettaExecutor.availableFor(configurables) -> RosettaExecutor(configurables).service(project)
|
||||
else -> HostExecutor().service(project)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ private abstract class RunGTestJob : WorkAction<RunGTestJob.Parameters> {
|
||||
when {
|
||||
target == hostTarget -> HostExecutor()
|
||||
configurables is AppleConfigurables && configurables.targetTriple.isSimulator -> XcodeSimulatorExecutor(configurables)
|
||||
configurables is AppleConfigurables && RosettaExecutor.availableFor(configurables) -> RosettaExecutor(configurables)
|
||||
else -> error("Cannot run for target $target")
|
||||
}
|
||||
}
|
||||
@@ -50,7 +51,7 @@ private abstract class RunGTestJob : WorkAction<RunGTestJob.Parameters> {
|
||||
with(parameters) {
|
||||
reportFileUnprocessed.asFile.get().parentFile.mkdirs()
|
||||
|
||||
executor.execute(executeRequest(this@with.executable.asFile.get().absolutePath).apply {
|
||||
executor.execute(ExecuteRequest(this@with.executable.asFile.get().absolutePath).apply {
|
||||
this.args.add("--gtest_output=xml:${reportFileUnprocessed.asFile.get().absolutePath}")
|
||||
filter.orNull?.also {
|
||||
this.args.add("--gtest_filter=${it}")
|
||||
|
||||
Reference in New Issue
Block a user