This method asserts that the given command ran successfully.
The goal is for it to be used by the different tests when needed.
Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
if self.emulator:
self.emulator.stop()
super(BRTest, self).tearDown()
+
+ # Run the given 'cmd' with a 'timeout' on the target and
+ # assert that the command succeeded
+ def assertRunOk(self, cmd, timeout=-1):
+ _, exit_code = self.emulator.run(cmd, timeout)
+ self.assertEqual(exit_code, 0)