Debugger/DebuggerInterfacePython.py

changeset 1499
b4d0457afb15
parent 1179
7661ab683f7b
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1497:94f27ede4186 1499:b4d0457afb15
705 705
706 @param text the text to be completed (string) 706 @param text the text to be completed (string)
707 """ 707 """
708 self.__sendCommand("{0}{1}\n".format(DebugProtocol.RequestCompletion, text)) 708 self.__sendCommand("{0}{1}\n".format(DebugProtocol.RequestCompletion, text))
709 709
710 def remoteUTPrepare(self, fn, tn, tfn, cov, covname, coverase): 710 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase):
711 """ 711 """
712 Public method to prepare a new unittest run. 712 Public method to prepare a new unittest run.
713 713
714 @param fn the filename to load (string) 714 @param fn the filename to load (string)
715 @param tn the testname to load (string) 715 @param tn the testname to load (string)
716 @param tfn the test function name to load tests from (string) 716 @param tfn the test function name to load tests from (string)
717 @param cov flag indicating collection of coverage data is requested 717 @param failed list of failed test, if only failed test should be run
718 (list of strings)
719 @param cov flag indicating collection of coverage data is requested (boolean)
718 @param covname filename to be used to assemble the coverage caches 720 @param covname filename to be used to assemble the coverage caches
719 filename 721 filename (string)
720 @param coverase flag indicating erasure of coverage data is requested 722 @param coverase flag indicating erasure of coverage data is requested (boolean)
721 """ 723 """
722 self.__scriptName = os.path.abspath(fn) 724 self.__scriptName = os.path.abspath(fn)
723 725
724 fn = self.translate(os.path.abspath(fn), False) 726 fn = self.translate(os.path.abspath(fn), False)
725 self.__sendCommand('{0}{1}|{2}|{3}|{4:d}|{5}|{6:d}\n'.format( 727 self.__sendCommand('{0}{1}|{2}|{3}|{4}|{5:d}|{6}|{7:d}\n'.format(
726 DebugProtocol.RequestUTPrepare, fn, tn, tfn, cov, covname, coverase)) 728 DebugProtocol.RequestUTPrepare, fn, tn, tfn, str(failed),
729 cov, covname, coverase))
727 730
728 def remoteUTRun(self): 731 def remoteUTRun(self):
729 """ 732 """
730 Public method to start a unittest run. 733 Public method to start a unittest run.
731 """ 734 """
944 if resp == DebugProtocol.ResponseUTStopTest: 947 if resp == DebugProtocol.ResponseUTStopTest:
945 self.debugServer.clientUtStopTest() 948 self.debugServer.clientUtStopTest()
946 continue 949 continue
947 950
948 if resp == DebugProtocol.ResponseUTTestFailed: 951 if resp == DebugProtocol.ResponseUTTestFailed:
949 testname, traceback = eval(evalArg) 952 testname, traceback, id = eval(evalArg)
950 self.debugServer.clientUtTestFailed(testname, traceback) 953 self.debugServer.clientUtTestFailed(testname, traceback, id)
951 continue 954 continue
952 955
953 if resp == DebugProtocol.ResponseUTTestErrored: 956 if resp == DebugProtocol.ResponseUTTestErrored:
954 testname, traceback = eval(evalArg) 957 testname, traceback, id = eval(evalArg)
955 self.debugServer.clientUtTestErrored(testname, traceback) 958 self.debugServer.clientUtTestErrored(testname, traceback, id)
956 continue 959 continue
957 960
958 if resp == DebugProtocol.ResponseUTTestSkipped: 961 if resp == DebugProtocol.ResponseUTTestSkipped:
959 testname, reason = eval(line[eoc:-1]) 962 testname, reason, id = eval(line[eoc:-1])
960 self.debugServer.clientUtTestSkipped(testname, reason) 963 self.debugServer.clientUtTestSkipped(testname, reason, id)
961 continue 964 continue
962 965
963 if resp == DebugProtocol.ResponseUTTestFailedExpected: 966 if resp == DebugProtocol.ResponseUTTestFailedExpected:
964 testname, traceback = eval(line[eoc:-1]) 967 testname, traceback, id = eval(line[eoc:-1])
965 self.debugServer.clientUtTestFailedExpected(testname, traceback) 968 self.debugServer.clientUtTestFailedExpected(testname, traceback, id)
966 continue 969 continue
967 970
968 if resp == DebugProtocol.ResponseUTTestSucceededUnexpected: 971 if resp == DebugProtocol.ResponseUTTestSucceededUnexpected:
969 testname = line[eoc:-1] 972 testname, id = eval(line[eoc:-1])
970 self.debugServer.clientUtTestSucceededUnexpected(testname) 973 self.debugServer.clientUtTestSucceededUnexpected(testname, id)
971 continue 974 continue
972 975
973 if resp == DebugProtocol.ResponseUTFinished: 976 if resp == DebugProtocol.ResponseUTFinished:
974 self.debugServer.clientUtFinished() 977 self.debugServer.clientUtFinished()
975 continue 978 continue

eric ide

mercurial