Changeset 2057
- Timestamp:
- Jun 26, 2008 12:26:52 PM (16 years ago)
- Location:
- pjproject/trunk/pjsip-apps/src/test-pjsua
- Files:
-
- 8 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/test-pjsua/inc_cfg.py
r2052 r2057 68 68 # params is list containing InstanceParams objects 69 69 inst_params = [] 70 # flag if this tes should be skipped 71 skip = None 70 72 # list of Expect instances, to be filled at run-time by 71 73 # the test program … … 78 80 title, # Test title 79 81 inst_params, # InstanceParam's as list 82 skip=False, 80 83 func=None, 81 84 post_func=None, … … 83 86 self.title = title 84 87 self.inst_params = inst_params 88 self.skip = skip 85 89 self.test_func = func 86 90 self.post_func = post_func -
pjproject/trunk/pjsip-apps/src/test-pjsua/mod_pesq.py
r2052 r2057 26 26 # PESQ_THRESHOLD specifies the minimum acceptable PESQ MOS value, so test can be declared successful 27 27 PESQ = "tools/pesq.exe" 28 PESQ_THRESHOLD = 1.028 PESQ_THRESHOLD = 3.0 29 29 30 30 # UserData … … 39 39 # Test body function 40 40 def test_func(t, user_data): 41 42 if len(t.process) == 0: 43 return 44 41 45 ua1 = t.process[0] 42 46 ua2 = t.process[1] … … 94 98 95 99 # Parse ouput 96 mo_pesq_out = re.compile("Prediction \s+:\s+PESQ_MOS\s+=\s+(.+)\s*").search(pesq_out[0])100 mo_pesq_out = re.compile("Prediction[^=]+=\s+([\d\.]+)\s*").search(pesq_out[0]) 97 101 if (mo_pesq_out == None): 98 102 raise TestError("Failed to fetch PESQ result") … … 101 105 pesq_res = mo_pesq_out.group(1) 102 106 if (float(pesq_res) >= PESQ_THRESHOLD): 103 endpt.trace("Success, PESQ result =" + pesq_res)107 endpt.trace("Success, PESQ result = " + pesq_res) 104 108 else: 105 endpt.trace("Failed, PESQ result =" + pesq_res)109 endpt.trace("Failed, PESQ result = " + pesq_res) 106 110 raise TestError("WAV seems to be degraded badly") 107 111 -
pjproject/trunk/pjsip-apps/src/test-pjsua/run.py
r2036 r2057 144 144 sys.exit(1) 145 145 146 if script.test.skip: 147 print "Test " + script.test.title + " is skipped" 148 sys.exit(0) 149 146 150 if len(script.test.inst_params) == 0: 147 151 print "Error: test doesn't contain pjsua run descriptions" -
pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/100_defaults.py
r2052 r2057 13 13 [ 14 14 InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --play-file wavs/input.16.wav --auto-play-hangup"), 15 InstanceParam("UA2", ADD_PARAM + "--max-calls=1 --rec-file wavs/tmp.16.wav --clock-rate 16000 --auto-answer 200 --auto-rec")15 InstanceParam("UA2", "--null-audio --max-calls=1 --rec-file wavs/tmp.16.wav --clock-rate 16000 --auto-answer 200 --auto-rec") 16 16 ] 17 17 ) -
pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711a.py
r2052 r2057 2 2 # 3 3 from inc_cfg import * 4 from config_site import *5 4 6 5 ADD_PARAM = "" … … 9 8 ADD_PARAM += "--null-audio" 10 9 11 # Simple call10 # Call with PCMA codec 12 11 test_param = TestParam( 13 12 "PESQ codec PCMA", 14 13 [ 15 14 InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec pcma --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"), 16 InstanceParam("UA2", ADD_PARAM + "--max-calls=1 --add-codec pcma --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec")15 InstanceParam("UA2", "--null-audio --max-calls=1 --add-codec pcma --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") 17 16 ] 18 17 ) -
pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711u.py
r2052 r2057 2 2 # 3 3 from inc_cfg import * 4 from config_site import *5 4 6 5 ADD_PARAM = "" … … 9 8 ADD_PARAM += "--null-audio" 10 9 11 # Simple call10 # Call with PCMU codec 12 11 test_param = TestParam( 13 12 "PESQ codec PCMU", 14 13 [ 15 14 InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec pcmu --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"), 16 InstanceParam("UA2", ADD_PARAM + "--max-calls=1 --add-codec pcmu --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec")15 InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec pcmu --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") 17 16 ] 18 17 ) -
pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g722.py
r2052 r2057 2 2 # 3 3 from inc_cfg import * 4 from config_site import *5 4 6 5 ADD_PARAM = "" … … 9 8 ADD_PARAM += "--null-audio" 10 9 11 # Simple call10 # Call with G722 codec 12 11 test_param = TestParam( 13 12 "PESQ codec G722", 14 13 [ 15 14 InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec g722 --clock-rate 16000 --play-file wavs/input.16.wav --auto-play-hangup"), 16 InstanceParam("UA2", ADD_PARAM + "--max-calls=1 --add-codec g722 --clock-rate 16000 --rec-file wavs/tmp.16.wav --auto-answer 200 --auto-rec")15 InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec g722 --clock-rate 16000 --rec-file wavs/tmp.16.wav --auto-answer 200 --auto-rec") 17 16 ] 18 17 ) -
pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_gsm.py
r2052 r2057 2 2 # 3 3 from inc_cfg import * 4 from config_site import *5 4 6 5 ADD_PARAM = "" … … 9 8 ADD_PARAM += "--null-audio" 10 9 11 # Simple call10 # Call with GSM codec 12 11 test_param = TestParam( 13 12 "PESQ codec GSM", 14 13 [ 15 14 InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec gsm --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"), 16 InstanceParam("UA2", ADD_PARAM + "--max-calls=1 --add-codec gsm --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec")15 InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec gsm --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") 17 16 ] 18 17 ) -
pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_ilbc.py
r2052 r2057 2 2 # 3 3 from inc_cfg import * 4 from config_site import *5 4 6 5 ADD_PARAM = "" … … 9 8 ADD_PARAM += "--null-audio" 10 9 11 # Simple call10 # Call with iLBC codec 12 11 test_param = TestParam( 13 12 "PESQ codec iLBC", 14 13 [ 15 14 InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec ilbc --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"), 16 InstanceParam("UA2", ADD_PARAM + "--max-calls=1 --add-codec ilbc --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec")15 InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec ilbc --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") 17 16 ] 18 17 ) -
pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_16000.py
r2052 r2057 2 2 # 3 3 from inc_cfg import * 4 from config_site import *5 4 6 5 ADD_PARAM = "" … … 9 8 ADD_PARAM += "--null-audio" 10 9 11 # Simple call10 # Call with Speex/16000 codec 12 11 test_param = TestParam( 13 12 "PESQ codec Speex WB", 14 13 [ 15 14 InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --clock-rate 16000 --add-codec speex/16000 --play-file wavs/input.16.wav --auto-play-hangup"), 16 InstanceParam("UA2", ADD_PARAM + "--max-calls=1 --clock-rate 16000 --add-codec speex/16000 --rec-file wavs/tmp.16.wav --auto-answer 200 --auto-rec")15 InstanceParam("UA2", "--null-sound --max-calls=1 --clock-rate 16000 --add-codec speex/16000 --rec-file wavs/tmp.16.wav --auto-answer 200 --auto-rec") 17 16 ] 18 17 ) -
pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_8000.py
r2052 r2057 2 2 # 3 3 from inc_cfg import * 4 from config_site import *5 4 6 5 ADD_PARAM = "" … … 9 8 ADD_PARAM += "--null-audio" 10 9 11 # Simple call10 # Call with Speex/8000 codec 12 11 test_param = TestParam( 13 12 "PESQ codec Speex NB", 14 13 [ 15 14 InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec speex/8000 --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"), 16 InstanceParam("UA2", ADD_PARAM + "--max-calls=1 --add-codec speex/8000 --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec")15 InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec speex/8000 --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") 17 16 ] 18 17 )
Note: See TracChangeset
for help on using the changeset viewer.