kola: add helper to log to machine journal
It would be helpful to be able to add a marker in the machine's journal
so that we can tell when looking at it what messages correspond to a
section of the kola test.
Add a helper for this.
@@ -180,6 +180,10 @@ func (t *TestCluster) MustSSHf(m platform.Machine, f string, args ...interface{}
return t.MustSSH(m, fmt.Sprintf(f, args...))
}
+func (t *TestCluster) JournalLog(m platform.Machine, f string, args ...interface{}) []byte {
+ return t.MustSSH(m, fmt.Sprintf("logger --tag kola '%s'", fmt.Sprintf(f, args...)))
+}
+
// RunCmdSync synchronously exectues a command, logging the output to the journal
func (t *TestCluster) RunCmdSync(m platform.Machine, cmd string) {
t.LogJournal(m, "+ "+cmd)
