957 """ |
988 """ |
958 public method to stop a unittest run. |
989 public method to stop a unittest run. |
959 """ |
990 """ |
960 self.debuggerInterface.remoteUTStop() |
991 self.debuggerInterface.remoteUTStop() |
961 |
992 |
962 def clientOutput(self, line): |
993 def signalClientOutput(self, line): |
963 """ |
994 """ |
964 Public method to process a line of client output. |
995 Public method to process a line of client output. |
965 |
996 |
966 @param line client output (string) |
997 @param line client output (string) |
967 """ |
998 """ |
968 self.emit(SIGNAL('clientOutput'), line) |
999 self.clientOutput.emit(line) |
969 |
1000 |
970 def clientLine(self, filename, lineno, forStack = False): |
1001 def signalClientLine(self, filename, lineno, forStack = False): |
971 """ |
1002 """ |
972 Public method to process client position feedback. |
1003 Public method to process client position feedback. |
973 |
1004 |
974 @param filename name of the file currently being executed (string) |
1005 @param filename name of the file currently being executed (string) |
975 @param lineno line of code currently being executed (integer) |
1006 @param lineno line of code currently being executed (integer) |
976 @param forStack flag indicating this is for a stack dump (boolean) |
1007 @param forStack flag indicating this is for a stack dump (boolean) |
977 """ |
1008 """ |
978 self.emit(SIGNAL('clientLine'), filename, lineno, forStack) |
1009 self.clientLine.emit(filename, lineno, forStack) |
979 |
1010 |
980 def clientStack(self, stack): |
1011 def signalClientStack(self, stack): |
981 """ |
1012 """ |
982 Public method to process a client's stack information. |
1013 Public method to process a client's stack information. |
983 |
1014 |
984 @param stack list of stack entries. Each entry is a tuple of three |
1015 @param stack list of stack entries. Each entry is a tuple of three |
985 values giving the filename, linenumber and method |
1016 values giving the filename, linenumber and method |
986 (list of lists of (string, integer, string)) |
1017 (list of lists of (string, integer, string)) |
987 """ |
1018 """ |
988 self.emit(SIGNAL('clientStack'), stack) |
1019 self.clientStack.emit(stack) |
989 |
1020 |
990 def clientThreadList(self, currentId, threadList): |
1021 def signalClientThreadList(self, currentId, threadList): |
991 """ |
1022 """ |
992 Public method to process the client thread list info. |
1023 Public method to process the client thread list info. |
993 |
1024 |
994 @param currentID id of the current thread (integer) |
1025 @param currentID id of the current thread (integer) |
995 @param threadList list of dictionaries containing the thread data |
1026 @param threadList list of dictionaries containing the thread data |
996 """ |
1027 """ |
997 self.emit(SIGNAL('clientThreadList'), currentId, threadList) |
1028 self.clientThreadList.emit(currentId, threadList) |
998 |
1029 |
999 def clientThreadSet(self): |
1030 def signalClientThreadSet(self): |
1000 """ |
1031 """ |
1001 Public method to handle the change of the client thread. |
1032 Public method to handle the change of the client thread. |
1002 """ |
1033 """ |
1003 self.emit(SIGNAL('clientThreadSet')) |
1034 self.clientThreadSet.emit() |
1004 |
1035 |
1005 def clientVariables(self, scope, variables): |
1036 def signalClientVariables(self, scope, variables): |
1006 """ |
1037 """ |
1007 Public method to process the client variables info. |
1038 Public method to process the client variables info. |
1008 |
1039 |
1009 @param scope scope of the variables (-1 = empty global, 1 = global, 0 = local) |
1040 @param scope scope of the variables (-1 = empty global, 1 = global, 0 = local) |
1010 @param variables the list of variables from the client |
1041 @param variables the list of variables from the client |
1011 """ |
1042 """ |
1012 self.emit(SIGNAL('clientVariables'), scope, variables) |
1043 self.clientVariables.emit(scope, variables) |
1013 |
1044 |
1014 def clientVariable(self, scope, variables): |
1045 def signalClientVariable(self, scope, variables): |
1015 """ |
1046 """ |
1016 Public method to process the client variable info. |
1047 Public method to process the client variable info. |
1017 |
1048 |
1018 @param scope scope of the variables (-1 = empty global, 1 = global, 0 = local) |
1049 @param scope scope of the variables (-1 = empty global, 1 = global, 0 = local) |
1019 @param variables the list of members of a classvariable from the client |
1050 @param variables the list of members of a classvariable from the client |
1020 """ |
1051 """ |
1021 self.emit(SIGNAL('clientVariable'), scope, variables) |
1052 self.clientVariable.emit(scope, variables) |
1022 |
1053 |
1023 def clientStatement(self, more): |
1054 def signalClientStatement(self, more): |
1024 """ |
1055 """ |
1025 Public method to process the input response from the client. |
1056 Public method to process the input response from the client. |
1026 |
1057 |
1027 @param more flag indicating that more user input is required |
1058 @param more flag indicating that more user input is required |
1028 """ |
1059 """ |
1029 self.emit(SIGNAL('clientStatement'), more) |
1060 self.clientStatement.emit(more) |
1030 |
1061 |
1031 def clientException(self, exceptionType, exceptionMessage, stackTrace): |
1062 def signalClientException(self, exceptionType, exceptionMessage, stackTrace): |
1032 """ |
1063 """ |
1033 Public method to process the exception info from the client. |
1064 Public method to process the exception info from the client. |
1034 |
1065 |
1035 @param exceptionType type of exception raised (string) |
1066 @param exceptionType type of exception raised (string) |
1036 @param exceptionMessage message given by the exception (string) |
1067 @param exceptionMessage message given by the exception (string) |
1037 @param stackTrace list of stack entries with the exception position |
1068 @param stackTrace list of stack entries with the exception position |
1038 first. Each stack entry is a list giving the filename and the linenumber. |
1069 first. Each stack entry is a list giving the filename and the linenumber. |
1039 """ |
1070 """ |
1040 self.emit(SIGNAL('clientException'), exceptionType, exceptionMessage, stackTrace) |
1071 self.clientException.emit(exceptionType, exceptionMessage, stackTrace) |
1041 |
1072 |
1042 def clientSyntaxError(self, message, filename, lineNo, characterNo): |
1073 def signalClientSyntaxError(self, message, filename, lineNo, characterNo): |
1043 """ |
1074 """ |
1044 Public method to process the syntax error info from the client. |
1075 Public method to process the syntax error info from the client. |
1045 |
1076 |
1046 @param message message of the syntax error (string) |
1077 @param message message of the syntax error (string) |
1047 @param filename translated filename of the syntax error position (string) |
1078 @param filename translated filename of the syntax error position (string) |
1048 @param lineNo line number of the syntax error position (integer) |
1079 @param lineNo line number of the syntax error position (integer) |
1049 @param characterNo character number of the syntax error position (integer) |
1080 @param characterNo character number of the syntax error position (integer) |
1050 """ |
1081 """ |
1051 self.emit(SIGNAL('clientSyntaxError'), message, filename, lineNo, characterNo) |
1082 self.clientSyntaxError.emit(message, filename, lineNo, characterNo) |
1052 |
1083 |
1053 def clientExit(self, status): |
1084 def signalClientExit(self, status): |
1054 """ |
1085 """ |
1055 Public method to process the client exit status. |
1086 Public method to process the client exit status. |
1056 |
1087 |
1057 @param status exit code as a string (string) |
1088 @param status exit code as a string (string) |
1058 """ |
1089 """ |
1059 if self.passive: |
1090 if self.passive: |
1060 self.__passiveShutDown() |
1091 self.__passiveShutDown() |
1061 self.emit(SIGNAL('clientExit(int)'), int(status)) |
1092 self.clientExit.emit(int(status)) |
1062 if Preferences.getDebugger("AutomaticReset"): |
1093 if Preferences.getDebugger("AutomaticReset"): |
1063 self.startClient(False) |
1094 self.startClient(False) |
1064 if self.passive: |
1095 if self.passive: |
1065 self.__createDebuggerInterface("None") |
1096 self.__createDebuggerInterface("None") |
1066 self.clientOutput(self.trUtf8('\nNot connected\n')) |
1097 self.signalClientOutput(self.trUtf8('\nNot connected\n')) |
1067 self.clientStatement(False) |
1098 self.signalClientStatement(False) |
1068 |
1099 |
1069 def clientClearBreak(self, filename, lineno): |
1100 def signalClientClearBreak(self, filename, lineno): |
1070 """ |
1101 """ |
1071 Public method to process the client clear breakpoint command. |
1102 Public method to process the client clear breakpoint command. |
1072 |
1103 |
1073 @param filename filename of the breakpoint (string) |
1104 @param filename filename of the breakpoint (string) |
1074 @param lineno line umber of the breakpoint (integer) |
1105 @param lineno line umber of the breakpoint (integer) |
1075 """ |
1106 """ |
1076 self.emit(SIGNAL('clientClearBreak'), filename, lineno) |
1107 self.clientClearBreak.emit(filename, lineno) |
1077 |
1108 |
1078 def clientBreakConditionError(self, filename, lineno): |
1109 def signalClientBreakConditionError(self, filename, lineno): |
1079 """ |
1110 """ |
1080 Public method to process the client breakpoint condition error info. |
1111 Public method to process the client breakpoint condition error info. |
1081 |
1112 |
1082 @param filename filename of the breakpoint (string) |
1113 @param filename filename of the breakpoint (string) |
1083 @param lineno line umber of the breakpoint (integer) |
1114 @param lineno line umber of the breakpoint (integer) |
1084 """ |
1115 """ |
1085 self.emit(SIGNAL('clientBreakConditionError'), filename, lineno) |
1116 self.clientBreakConditionError.emit(filename, lineno) |
1086 |
1117 |
1087 def clientClearWatch(self, condition): |
1118 def signalClientClearWatch(self, condition): |
1088 """ |
1119 """ |
1089 Public slot to handle the clientClearWatch signal. |
1120 Public slot to handle the clientClearWatch signal. |
1090 |
1121 |
1091 @param condition expression of watch expression to clear (string) |
1122 @param condition expression of watch expression to clear (string) |
1092 """ |
1123 """ |
1093 self.emit(SIGNAL('clientClearWatch'), condition) |
1124 self.clientClearWatch.emit(condition) |
1094 |
1125 |
1095 def clientWatchConditionError(self, condition): |
1126 def signalClientWatchConditionError(self, condition): |
1096 """ |
1127 """ |
1097 Public method to process the client watch expression error info. |
1128 Public method to process the client watch expression error info. |
1098 |
1129 |
1099 @param condition expression of watch expression to clear (string) |
1130 @param condition expression of watch expression to clear (string) |
1100 """ |
1131 """ |
1101 self.emit(SIGNAL('clientWatchConditionError'), condition) |
1132 self.clientWatchConditionError.emit(condition) |
1102 |
1133 |
1103 def clientRawInput(self, prompt, echo): |
1134 def signalClientRawInput(self, prompt, echo): |
1104 """ |
1135 """ |
1105 Public method to process the client raw input command. |
1136 Public method to process the client raw input command. |
1106 |
1137 |
1107 @param prompt the input prompt (string) |
1138 @param prompt the input prompt (string) |
1108 @param echo flag indicating an echoing of the input (boolean) |
1139 @param echo flag indicating an echoing of the input (boolean) |
1109 """ |
1140 """ |
1110 self.emit(SIGNAL('clientRawInput'), prompt, echo) |
1141 self.clientRawInput.emit(prompt, echo) |
1111 |
1142 |
1112 def clientBanner(self, version, platform, debugClient): |
1143 def signalClientBanner(self, version, platform, debugClient): |
1113 """ |
1144 """ |
1114 Public method to process the client banner info. |
1145 Public method to process the client banner info. |
1115 |
1146 |
1116 @param version interpreter version info (string) |
1147 @param version interpreter version info (string) |
1117 @param platform hostname of the client (string) |
1148 @param platform hostname of the client (string) |
1118 @param debugClient additional debugger type info (string) |
1149 @param debugClient additional debugger type info (string) |
1119 """ |
1150 """ |
1120 self.emit(SIGNAL('clientBanner'), version, platform, debugClient) |
1151 self.clientBanner.emit(version, platform, debugClient) |
1121 |
1152 |
1122 def clientCapabilities(self, capabilities, clientType): |
1153 def signalClientCapabilities(self, capabilities, clientType): |
1123 """ |
1154 """ |
1124 Public method to process the client capabilities info. |
1155 Public method to process the client capabilities info. |
1125 |
1156 |
1126 @param capabilities bitmaks with the client capabilities (integer) |
1157 @param capabilities bitmaks with the client capabilities (integer) |
1127 @param clientType type of the debug client (string) |
1158 @param clientType type of the debug client (string) |
1128 """ |
1159 """ |
1129 self.__clientCapabilities[clientType] = capabilities |
1160 self.__clientCapabilities[clientType] = capabilities |
1130 self.emit(SIGNAL('clientCapabilities'), capabilities, clientType) |
1161 self.clientCapabilities.emit(capabilities, clientType) |
1131 |
1162 |
1132 def clientCompletionList(self, completionList, text): |
1163 def signalClientCompletionList(self, completionList, text): |
1133 """ |
1164 """ |
1134 Public method to process the client auto completion info. |
1165 Public method to process the client auto completion info. |
1135 |
1166 |
1136 @param completionList list of possible completions (list of strings) |
1167 @param completionList list of possible completions (list of strings) |
1137 @param text the text to be completed (string) |
1168 @param text the text to be completed (string) |
1138 """ |
1169 """ |
1139 self.emit(SIGNAL('clientCompletionList'), completionList, text) |
1170 self.clientCompletionList.emit(completionList, text) |
1140 |
1171 |
1141 def clientUtPrepared(self, result, exceptionType, exceptionValue): |
1172 def clientUtPrepared(self, result, exceptionType, exceptionValue): |
1142 """ |
1173 """ |
1143 Public method to process the client unittest prepared info. |
1174 Public method to process the client unittest prepared info. |
1144 |
1175 |
1145 @param result number of test cases (0 = error) (integer) |
1176 @param result number of test cases (0 = error) (integer) |
1146 @param exceptionType exception type (string) |
1177 @param exceptionType exception type (string) |
1147 @param exceptionValue exception message (string) |
1178 @param exceptionValue exception message (string) |
1148 """ |
1179 """ |
1149 self.emit(SIGNAL('utPrepared'), result, exceptionType, exceptionValue) |
1180 self.utPrepared.emit(result, exceptionType, exceptionValue) |
1150 |
1181 |
1151 def clientUtStartTest(self, testname, doc): |
1182 def clientUtStartTest(self, testname, doc): |
1152 """ |
1183 """ |
1153 Public method to process the client start test info. |
1184 Public method to process the client start test info. |
1154 |
1185 |
1155 @param testname name of the test (string) |
1186 @param testname name of the test (string) |
1156 @param doc short description of the test (string) |
1187 @param doc short description of the test (string) |
1157 """ |
1188 """ |
1158 self.emit(SIGNAL('utStartTest'), testname, doc) |
1189 self.utStartTest.emit(testname, doc) |
1159 |
1190 |
1160 def clientUtStopTest(self): |
1191 def clientUtStopTest(self): |
1161 """ |
1192 """ |
1162 Public method to process the client stop test info. |
1193 Public method to process the client stop test info. |
1163 """ |
1194 """ |
1164 self.emit(SIGNAL('utStopTest')) |
1195 self.utStopTest.emit() |
1165 |
1196 |
1166 def clientUtTestFailed(self, testname, traceback): |
1197 def clientUtTestFailed(self, testname, traceback): |
1167 """ |
1198 """ |
1168 Public method to process the client test failed info. |
1199 Public method to process the client test failed info. |
1169 |
1200 |
1170 @param testname name of the test (string) |
1201 @param testname name of the test (string) |
1171 @param traceback lines of traceback info (string) |
1202 @param traceback lines of traceback info (string) |
1172 """ |
1203 """ |
1173 self.emit(SIGNAL('utTestFailed'), testname, traceback) |
1204 self.utTestFailed.emit(testname, traceback) |
1174 |
1205 |
1175 def clientUtTestErrored(self, testname, traceback): |
1206 def clientUtTestErrored(self, testname, traceback): |
1176 """ |
1207 """ |
1177 Public method to process the client test errored info. |
1208 Public method to process the client test errored info. |
1178 |
1209 |
1179 @param testname name of the test (string) |
1210 @param testname name of the test (string) |
1180 @param traceback lines of traceback info (string) |
1211 @param traceback lines of traceback info (string) |
1181 """ |
1212 """ |
1182 self.emit(SIGNAL('utTestErrored'), testname, traceback) |
1213 self.utTestErrored.emit(testname, traceback) |
1183 |
1214 |
1184 def clientUtFinished(self): |
1215 def clientUtFinished(self): |
1185 """ |
1216 """ |
1186 Public method to process the client unit test finished info. |
1217 Public method to process the client unit test finished info. |
1187 """ |
1218 """ |
1188 self.emit(SIGNAL('utFinished')) |
1219 self.utFinished.emit() |
1189 |
1220 |
1190 def passiveStartUp(self, fn, exc): |
1221 def passiveStartUp(self, fn, exc): |
1191 """ |
1222 """ |
1192 Public method to handle a passive debug connection. |
1223 Public method to handle a passive debug connection. |
1193 |
1224 |