Changeset 2013 for pjproject/trunk/pjsip-apps/src/test-pjsua
- Timestamp:
- Jun 12, 2008 7:13:51 PM (16 years ago)
- Location:
- pjproject/trunk/pjsip-apps/src/test-pjsua
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/test-pjsua/inc_cfg.py
r2009 r2013 19 19 # Call config class 20 20 class CallConfig: 21 # additional parameter to be added to target URI 22 uri_param = "" 21 23 def __init__(self, title, callee_cfg, caller_cfg): 22 24 self.title = title -
pjproject/trunk/pjsip-apps/src/test-pjsua/inc_param.py
r2009 r2013 32 32 class Test: 33 33 title = "" 34 # params is list containing Pjsua Paramobjects34 # params is list containing Pjsua objects 35 35 run = [] 36 36 # list of Expect instances, to be filled at run-time by -
pjproject/trunk/pjsip-apps/src/test-pjsua/mod_call.py
r2012 r2013 36 36 # Caller making call 37 37 caller.send("m") 38 caller.send("sip:localhost:" + port1 )38 caller.send("sip:localhost:" + port1 + cfg_file.config.uri_param) 39 39 caller.expect(const.STATE_CALLING) 40 40 -
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.