Changeset 2013 for pjproject/trunk/pjsip-apps/src/test-pjsua/run.py
- Timestamp:
- Jun 12, 2008 7:13:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/test-pjsua/run.py
r2009 r2013 48 48 line = self.proc.stdout.readline() 49 49 if line == "": 50 raise TestError( "Premature EOF")50 raise TestError(self.name + ": Premature EOF") 51 51 # Print the line if echo is ON 52 52 if self.echo: … … 54 54 # Trap assertion error 55 55 if self.ra.search(line) != None: 56 raise TestError(line) 56 if raise_on_error: 57 raise TestError(self.name + ": " + line) 58 else: 59 return None 57 60 # Count stdout refresh text. 58 61 if self.rr.search(line) != None: … … 61 64 self.trace("Timed-out!") 62 65 if raise_on_error: 63 raise TestError( "Timeout expecting pattern: " + pattern)66 raise TestError(self.name + ": Timeout expecting pattern: " + pattern) 64 67 else: 65 68 return None # timeout … … 81 84 for p in t.process: 82 85 p.send("q") 83 p.expect(const.DESTROYED )86 p.expect(const.DESTROYED, False) 84 87 p.wait() 85 88 print "Test completed with error: " + errmsg … … 118 121 p.send("echo 1") 119 122 p.send("echo 1") 123 p.expect("echo 1") 120 124 # add running instance 121 125 script.test.process.append(p) … … 144 148 p.send("q") 145 149 time.sleep(0.5) 146 p.expect(const.DESTROYED )150 p.expect(const.DESTROYED, False) 147 151 p.wait() 148 152
Note: See TracChangeset
for help on using the changeset viewer.