Changeset 2062 for pjproject/trunk/pjsip-apps/src/test-pjsua/run.py
- Timestamp:
- Jun 26, 2008 4:27:17 PM (16 years ago)
- Location:
- pjproject/trunk/pjsip-apps/src/test-pjsua
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/test-pjsua
- Property svn:ignore
-
old new 1 1 *.pyc 2 2 *log 3 p*.txt
-
- Property svn:ignore
-
pjproject/trunk/pjsip-apps/src/test-pjsua/run.py
r2057 r2062 62 62 fullcmd = G_EXE + " " + inst_param.arg + " --stdout-refresh=5 --stdout-refresh-text=" + const.STDOUT_REFRESH 63 63 self.trace("Popen " + fullcmd) 64 self.proc = subprocess.Popen(fullcmd, shell=G_INUNIX, bufsize=0, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines= True)64 self.proc = subprocess.Popen(fullcmd, shell=G_INUNIX, bufsize=0, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=False) 65 65 def send(self, cmd): 66 66 self.trace("send " + cmd) 67 67 self.proc.stdin.writelines(cmd + "\n") 68 def expect(self, pattern, raise_on_error=True): 68 self.proc.stdin.flush() 69 def expect(self, pattern, raise_on_error=True, title=""): 69 70 self.trace("expect " + pattern) 70 71 r = re.compile(pattern, re.I) … … 89 90 self.trace("Timed-out!") 90 91 if raise_on_error: 91 raise TestError(self.name + " : Timeout expecting pattern: " + pattern)92 raise TestError(self.name + " " + title + ": Timeout expecting pattern: \"" + pattern + "\"") 92 93 else: 93 94 return None # timeout
Note: See TracChangeset
for help on using the changeset viewer.