mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Bubble up test result messages.
This commit is contained in:
parent
f276eb3001
commit
6401a9d2af
16 changed files with 63 additions and 32 deletions
|
@ -94,11 +94,11 @@ class JavaCompiler @Inject constructor(val jvmCompiler: JvmCompiler, val kobaltL
|
|||
}
|
||||
|
||||
return if (result) {
|
||||
TaskResult(true, "Compilation succeeded")
|
||||
TaskResult(true, errorMessage = "Compilation succeeded")
|
||||
} else {
|
||||
val message = "Compilation errors, command:\n$command\n" + errorMessage
|
||||
logk(1, message)
|
||||
TaskResult(false, message)
|
||||
TaskResult(false, errorMessage = message)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ class KotlinCompiler @Inject constructor(
|
|||
// The Kotlin compiler issues warnings on stderr :-(
|
||||
containsErrors = { errors: List<String> -> errors.any { it.contains("rror")} }
|
||||
}).invoke()
|
||||
return TaskResult(result == 0, "Error while compiling")
|
||||
return TaskResult(result == 0, errorMessage = "Error while compiling")
|
||||
}
|
||||
|
||||
private fun invokeCompilerDirectly(projectName: String, outputDir: String?, info: CompilerActionInfo,
|
||||
|
|
|
@ -204,7 +204,7 @@ class BintrayApi @Inject constructor(val http: Http,
|
|||
return TaskResult()
|
||||
} else {
|
||||
error(" Errors while uploading:\n" + errorMessages.map { " $it" }.joinToString("\n"))
|
||||
return TaskResult(false, errorMessages.joinToString("\n"))
|
||||
return TaskResult(false, errorMessage = errorMessages.joinToString("\n"))
|
||||
}
|
||||
} else {
|
||||
warn("Found no artifacts to upload")
|
||||
|
|
|
@ -153,7 +153,7 @@ class PublishPlugin @Inject constructor(val files: KFiles, val factory: PomGener
|
|||
TaskResult()
|
||||
}
|
||||
|
||||
val result = TaskResult(tmpResult.success, messages.joinToString("\n "))
|
||||
val result = TaskResult(tmpResult.success, errorMessage = messages.joinToString("\n "))
|
||||
|
||||
return result
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class DynamicGraphTest {
|
|||
override fun call() : TaskResult2<T> {
|
||||
kobaltLog(2, "Running node $n")
|
||||
runNodes.add(n)
|
||||
return TaskResult2(errorFunction(n), null, n)
|
||||
return TaskResult2(errorFunction(n), value = n)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue