Alternatively, simply capture the output in result.output without summary.txt redirection (e.g. drop the '> summary.txt' bit); we can fine-tune the failure processing later on. Alex On Thu, 27 May 2021 at 10:32, Alexander Kanavin via lists.openembedded.org wrote: > On Thu, 27 May 2021 at 10:11, Vinay Kumar wrote: > >> + cmd = cmd + " cd %s; python3 >> src/bootstrap/bootstrap.py test %s --target %s > summary.txt 2>&1;" % >> (builddir, testargs, targetsys) >> + # To kill remote-test-server executing through >> background ssh >> + killcommand = "kill -9 \$(ps | grep >> remote-test-server | grep -v \"grep\" | awk '{print \$1}')" >> + cmd = cmd + "ssh %s root@%s \"%s\";" % (sshargs, >> qemu.ip, killcommand) >> + result = runCmd(cmd) >> + self.assertEqual(0, result.status, 'oe-selftest >> returned a non 0 status:%s' % result.output) > > > What does result.output contains if the test fails? Since both stdout and > stderr are redirected to a file, there might be nothing at all there? > > I'd suggest you actually print all of summary.txt in case of failure (yes > it's over a megabyte, that is fine), and also point out where the file can > be found for further inspection. > > Alex > > > >