Skip to content

Commit 7912143

Browse files
cgwaltersjlebon
authored andcommitted
kola: Don't drop stderr on the floor from unit starting function
Amazingly we had *two* places that dropped stderr, this was the second. The default `c.SSH` captures logs from test failures but this was an *infra* failure so we need to drop to the raw ssh tool. (This could use a big cleanup but that's...a bigger project)
1 parent 53526ee commit 7912143

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mantle/kola/harness.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,6 @@ func metadataFromTestBinary(executable string) (*externalTestMeta, error) {
11001100
// handling.
11011101
func runExternalTest(c cluster.TestCluster, mach platform.Machine, testNum int) error {
11021102
var previousRebootState string
1103-
var stdout []byte
11041103
for {
11051104
bootID, err := platform.GetMachineBootId(mach)
11061105
if err != nil {
@@ -1126,11 +1125,11 @@ func runExternalTest(c cluster.TestCluster, mach platform.Machine, testNum int)
11261125
unit := fmt.Sprintf("%s.service", KoletExtTestUnit)
11271126
cmd = fmt.Sprintf("sudo /usr/local/bin/kolet run-test-unit %s", shellquote.Join(unit))
11281127
}
1129-
stdout, err = c.SSH(mach, cmd)
1130-
1128+
stdout, stderr, err := mach.SSH(cmd)
11311129
if err != nil {
1132-
return errors.Wrapf(err, "kolet run-test-unit failed")
1130+
return errors.Wrapf(err, "kolet run-test-unit failed: %s %s", string(stdout), string(stderr))
11331131
}
1132+
11341133
koletRes := KoletResult{}
11351134
if len(stdout) > 0 {
11361135
err = json.Unmarshal(stdout, &koletRes)

0 commit comments

Comments
 (0)