improve output, remove /bin/bash prefix
This commit is contained in:
parent
44a2cb9206
commit
b625d338e6
2 changed files with 7 additions and 5 deletions
src
main/kotlin/org/domaindrivenarchitecture/provs/framework/core
test/kotlin/org/domaindrivenarchitecture/provs/framework/core
|
@ -1,5 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.framework.core
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.platforms.SHELL
|
||||
import org.domaindrivenarchitecture.provs.framework.core.platforms.UbuntuProv
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.LocalProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.Processor
|
||||
|
@ -325,7 +326,8 @@ open class Prov protected constructor(
|
|||
ProvResult(false, err = "mode unknown")
|
||||
}
|
||||
|
||||
internalResults[resultIndex].provResult = returnValue
|
||||
val resultValueWithCmdCleanedUp = returnValue.copy(cmd = returnValue.cmd?.replace("[" + SHELL + ", -c, ", "["))
|
||||
internalResults[resultIndex].provResult = resultValueWithCmdCleanedUp
|
||||
|
||||
// Add failure result to output if not yet included,
|
||||
// which is the case if the result was not part of another subtask but created and returned by the lambda itself.
|
||||
|
|
|
@ -318,10 +318,10 @@ internal class ProvTest {
|
|||
"---> \u001B[92mSuccess\u001B[0m -- testMethodForOutputTest_with_mode_requireLast (requireLast) \n" +
|
||||
"------> \u001B[93mFAILED\u001B[0m -- checkPrereq_evaluateToFailure (requireLast) -- Error: This is a test error.\n" +
|
||||
"------> \u001B[92mSuccess\u001B[0m -- sh \n" +
|
||||
"---------> \u001B[92mSuccess\u001B[0m -- cmd [/bin/bash, -c, echo -Start test-]\n" +
|
||||
"---------> \u001B[92mSuccess\u001B[0m -- cmd [/bin/bash, -c, echo Some output]\n" +
|
||||
"---------> \u001B[92mSuccess\u001B[0m -- cmd [echo -Start test-]\n" +
|
||||
"---------> \u001B[92mSuccess\u001B[0m -- cmd [echo Some output]\n" +
|
||||
"------> \u001B[92mSuccess\u001B[0m -- sh \n" +
|
||||
"---------> \u001B[92mSuccess\u001B[0m -- cmd [/bin/bash, -c, echo -End test-]\n" +
|
||||
"---------> \u001B[92mSuccess\u001B[0m -- cmd [echo -End test-]\n" +
|
||||
"----------------------------------------------------------------------------------------------------\n" +
|
||||
"Overall > \u001B[92mSuccess\u001B[0m\n" +
|
||||
"============================================ SUMMARY END ===========================================\n" +
|
||||
|
@ -363,7 +363,7 @@ internal class ProvTest {
|
|||
"------> \u001B[91mFAILED\u001B[0m -- sub1 \n" +
|
||||
"---------> \u001B[92mSuccess\u001B[0m -- testMethodForOutputTest_nested_with_failure \n" +
|
||||
"---------> \u001B[91mFAILED\u001B[0m -- <<returned result>> -- Error: Iamanerrormessage\n" +
|
||||
"------> \u001B[92mSuccess\u001B[0m -- cmd [/bin/bash, -c, echo -End test-]\n" +
|
||||
"------> \u001B[92mSuccess\u001B[0m -- cmd [echo -End test-]\n" +
|
||||
"----------------------------------------------------------------------------------------------------\n" +
|
||||
"Overall > \u001B[91mFAILED\u001B[0m \n" +
|
||||
"============================================ SUMMARY END ===========================================\n" +
|
||||
|
|
Loading…
Add table
Reference in a new issue