harness: add TIMEOUT to expected exceptions in InteractiveTest
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Mon, 17 Aug 2015 09:02:52 +0000 (11:02 +0200)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Mon, 17 Aug 2015 09:03:24 +0000 (11:03 +0200)
Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

tools/harness/tests/common.py

index 4d0d5f8..095c7d6 100644 (file)
@@ -255,6 +255,11 @@ class InteractiveTest(TestCommon):
             machine.force_write(self.console)
             try:
                 self.interact()
+            except pexpect.TIMEOUT, e:
+                self.console.logfile.seek(0)
+                print "Interaction timed out:"
+                print self.console.logfile.readlines()
+                raise e
             except OSError, e:
                 self.console.logfile.seek(0)
                 print self.console.logfile.readlines()