from Vanapagan.Detector.WinBasic import WinBasic from Vanapagan.Loging.FilesystemLoging import FilesystemLoging log = FilesystemLoging() run = WinBasic() run.run(['crash']) crash = run.waitForCrash(10, True) if crash != None: log.log("./Readme.txt", crash, "TEST")
break pid = getPidByImg("WWAHost.exe") if pid != 0: break countFailure += 1 if countFailure > 10: killByPid(proc1.pid) raise Exception("F**k it") time.sleep(1) run.attachPid(pid) proc2 = subprocess.Popen( ["cmd", "/c", "start c:/Work/test" + extension], stdout=subprocess.PIPE, stderr=subprocess.PIPE) crash = run.waitForCrash(6) run.close() if crash != None: if first == 4: print "Issue detected at %s" % crash.location log.log("c:/Work/test" + extension, crash, desc) first = 0 else: first += 1 else: first = 0 killByImg("Video.UI.exe") killByImg("WWAHost.exe") killByPid(proc1.pid) killByPid(proc2.pid)
while True: pid = getPidByImg("Video.UI.exe") if pid != 0: break pid = getPidByImg("WWAHost.exe") if pid != 0: break countFailure += 1 if countFailure > 10: killByPid(proc1.pid) raise Exception("F**k it") time.sleep(1) run.attachPid(pid) proc2 = subprocess.Popen(["cmd", "/c","start c:/Work/test" + extension], stdout=subprocess.PIPE, stderr=subprocess.PIPE) crash = run.waitForCrash(6) run.close() if crash != None: if first == 4: print "Issue detected at %s" % crash.location log.log("c:/Work/test" + extension, crash, desc) first = 0 else: first += 1 else: first = 0 killByImg("Video.UI.exe") killByImg("WWAHost.exe") killByPid(proc1.pid) killByPid(proc2.pid)