(args)
| 157 | #This function is defunct now |
| 158 | @timeout(5, "fileName") # timeout is 15 minutes, 15*60 = 300 secs |
| 159 | def checkTimeOutPut2(args): |
| 160 | global currCommandProcess |
| 161 | #ret = subprocess.check_output(args, stderr=subprocess.STDOUT) |
| 162 | #return ret |
| 163 | currCommandProcess = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 164 | printLog("Curr Command Process id = "+str(currCommandProcess.pid)) |
| 165 | ret = currCommandProcess.communicate() |
| 166 | if(ret[0] == None or ret[0] == ''): |
| 167 | errCode = currCommandProcess.poll() |
| 168 | raise subprocess.CalledProcessError(errCode, args, output=ret[1]) |
| 169 | return ret[0] |
| 170 | |
| 171 | #Spawns a separate thread to execute the library command and wait for that thread to complete |
| 172 | #This wait is of 900 seconds (15 minutes). If still the thread is alive then we kill the thread |
nothing calls this directly
no test coverage detected