|
@@ -88,7 +88,12 @@ class BRTest(BRConfigTest):
|
|
|
super(BRTest, self).tearDown()
|
|
|
|
|
|
# Run the given 'cmd' with a 'timeout' on the target and
|
|
|
- # assert that the command succeeded
|
|
|
+ # assert that the command succeeded; on error, print the
|
|
|
+ # faulty command and its output
|
|
|
def assertRunOk(self, cmd, timeout=-1):
|
|
|
- _, exit_code = self.emulator.run(cmd, timeout)
|
|
|
- self.assertEqual(exit_code, 0)
|
|
|
+ out, exit_code = self.emulator.run(cmd, timeout)
|
|
|
+ self.assertEqual(
|
|
|
+ exit_code,
|
|
|
+ 0,
|
|
|
+ "\nFailed to run: {}\noutput was:\n{}".format(cmd, ' '+'\n '.join(out))
|
|
|
+ )
|