1
0

feat: parameter to display the output of successful stages

This commit is contained in:
2024-10-07 20:59:16 +00:00
parent a852e2d9e9
commit fee3b44c6e
4 changed files with 18 additions and 8 deletions

View File

@@ -281,7 +281,7 @@ func CopyFile(sourcePath, destinationPath string) (err error) {
}
func copyArtifactAndTest(slog zerolog.Logger, q *qemu.System, ka Artifact,
res *Result, remoteTest string) (err error) {
res *Result, remoteTest string, outputOnSuccess bool) (err error) {
// Copy all test files to the remote machine
for _, f := range ka.TestFiles {
@@ -346,7 +346,11 @@ func copyArtifactAndTest(slog zerolog.Logger, q *qemu.System, ka Artifact,
return
}
slog.Info().Msgf("test success\n%v\n", res.Test.Output)
if outputOnSuccess {
slog.Info().Msgf("test success\n%v\n", res.Test.Output)
} else {
slog.Info().Msg("test success")
}
_, err = q.Command("root", "echo")
if err != nil {