- 論壇徽章:
- 0
|
- def run_fail_test(test_list):
- 297 for testcase in test_list.split(","):
- 298 # os.system("/usr/bin/python "+testcase)
- 299 command = "/usr/bin/python "+testcase
- 300 print command
- 301 #args = shlex.split(command)
- 302 # print args
- 303 children = subprocess.Popen(["/usr/bin/python",testcase],stdout=subprocess.PIPE)
- 304 stdoutput = children.communicate
- 305 if "Fail" in stdout :
- 306 print "testcase have failed case,need to check!"
- 307 exit(1)
- 308 else :
- 309 print "run testcase pass"
- 310 return 0
復制代碼 但是最后還是報錯了,報錯內容如下:
Traceback (most recent call last):
xxxxxxxx(這里是調用的腳本import的一些信息)
m = child.expect([self.newkeyPrompt, self.psswdPrompt, pexpect.EOF])
File "/usr/lib/python2.4/site-packages/pexpect.py", line 1311, in expect
return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
File "/usr/lib/python2.4/site-packages/pexpect.py", line 1325, in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
File "/usr/lib/python2.4/site-packages/pexpect.py", line 1378, in expect_loop
c = self.read_nonblocking (self.maxread, timeout)
File "/usr/lib/python2.4/site-packages/pexpect.py", line 841, in read_nonblocking
self.logfile_read.flush()
IOError: [Errno 32] Broken pipe
|
|