Changeset 2036
- Timestamp:
- Jun 20, 2008 5:43:55 PM (16 years ago)
- Location:
- pjproject/trunk/pjsip-apps/src/test-pjsua
- Files:
-
- 17 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/test-pjsua/mod_media_playrec.py
r2029 r2036 2 2 3 3 # PLAYFILE -> RECFILE: 4 # input file is played and is recorded to output, then compare them. 4 # Input file is played and is recorded to output, then compare them. 5 # Useful to tes clock rates compatibility and resample quality 5 6 # null-audio 6 7 # port 1: wav file input xxxxxx.clock_rate.wav, e.g: test1.8.wav 7 8 # port 2: wav file ouput xxxxxx.clock_rate.wav, e.g: res1.8.wav 8 # wav input m ore than 3 seconds9 # wav input must be more than 3 seconds long 9 10 10 11 import time … … 76 77 endpt.trace("Popen " + fullcmd) 77 78 cmp_proc = subprocess.Popen(fullcmd, stdout=subprocess.PIPE, universal_newlines=True) 79 80 # Parse similarity ouput 78 81 line = cmp_proc.stdout.readline() 79 endpt.trace("WAV similarity = " + line) 82 mo_sim_val = re.match(".+=\s+(\d+)", line) 83 if (mo_sim_val == None): 84 raise TestError("Error comparing WAV files") 85 return 86 87 # Evaluate the similarity value 88 sim_val = mo_sim_val.group(1) 89 if (sim_val > 0): 90 endpt.trace("WAV similarity = " + sim_val) 91 else: 92 raise TestError("Degraded WAV heavily distorted") 80 93 81 94 -
pjproject/trunk/pjsip-apps/src/test-pjsua/run.py
r2033 r2036 110 110 ######################### 111 111 # Error handling 112 def handle_error(errmsg, t ):112 def handle_error(errmsg, t, close_processes = True): 113 113 print "====== Caught error: " + errmsg + " ======" 114 time.sleep(1) 115 for p in t.process: 116 p.send("q") 117 p.send("q") 118 p.expect(const.DESTROYED, False) 119 p.wait() 114 if (close_processes): 115 time.sleep(1) 116 for p in t.process: 117 p.send("q") 118 p.send("q") 119 p.expect(const.DESTROYED, False) 120 p.wait() 120 121 print "Test completed with error: " + errmsg 121 122 sys.exit(1) … … 196 197 script.test.post_func(script.test, script.test.user_data) 197 198 except TestError, e: 198 handle_error(e.desc, script.test )199 handle_error(e.desc, script.test, False) 199 200 200 201 # Done -
pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-sendto/100_simplecall.py
r2034 r2036 1 # $Id :$1 # $Id$ 2 2 import inc_sip as sip 3 3 import inc_sdp as sdp … … 17 17 """ 18 18 19 sendto_cfg = sip.SendtoCfg( "simple call", "--null-audio ", sdp, 200)19 sendto_cfg = sip.SendtoCfg( "simple call", "--null-audio --auto-answer 200", sdp, 200) 20 20
Note: See TracChangeset
for help on using the changeset viewer.