944 "workdir": workdir, |
944 "workdir": workdir, |
945 "discoverystart": discoveryStart, |
945 "discoverystart": discoveryStart, |
946 }) |
946 }) |
947 |
947 |
948 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase, |
948 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase, |
949 syspath, workdir, discover, discoveryStart, testCases): |
949 syspath, workdir, discover, discoveryStart, testCases, |
|
950 debug): |
950 """ |
951 """ |
951 Public method to prepare a new unittest run. |
952 Public method to prepare a new unittest run. |
952 |
953 |
953 @param fn name of file to load |
954 @param fn name of file to load |
954 @type str |
955 @type str |
974 @type bool |
975 @type bool |
975 @param discoveryStart directory to start auto-discovery at |
976 @param discoveryStart directory to start auto-discovery at |
976 @type str |
977 @type str |
977 @param testCases list of test cases to be loaded |
978 @param testCases list of test cases to be loaded |
978 @type list of str |
979 @type list of str |
|
980 @param debug flag indicating to run unittest with debugging |
|
981 @type bool |
979 """ |
982 """ |
980 if fn: |
983 if fn: |
981 self.__scriptName = os.path.abspath(fn) |
984 self.__scriptName = os.path.abspath(fn) |
982 |
985 |
983 fn = self.translate(os.path.abspath(fn), False) |
986 fn = self.translate(os.path.abspath(fn), False) |
995 "syspath": [] if syspath is None else syspath, |
998 "syspath": [] if syspath is None else syspath, |
996 "workdir": workdir, |
999 "workdir": workdir, |
997 "discover": discover, |
1000 "discover": discover, |
998 "discoverystart": discoveryStart, |
1001 "discoverystart": discoveryStart, |
999 "testcases": [] if testCases is None else testCases, |
1002 "testcases": [] if testCases is None else testCases, |
1000 }) |
1003 "debug": debug, |
1001 |
1004 }) |
1002 def remoteUTRun(self): |
1005 |
|
1006 def remoteUTRun(self, debug, failfast): |
1003 """ |
1007 """ |
1004 Public method to start a unittest run. |
1008 Public method to start a unittest run. |
1005 """ |
1009 |
1006 self.__sendJsonCommand("RequestUTRun", {}) |
1010 @param debug flag indicating to run unittest with debugging |
|
1011 @type bool |
|
1012 @param failfast flag indicating to stop at the first error |
|
1013 @type bool |
|
1014 """ |
|
1015 if debug: |
|
1016 self.__autoContinue = True |
|
1017 self.__sendJsonCommand("RequestUTRun", { |
|
1018 "debug": debug, |
|
1019 "failfast": failfast, |
|
1020 }) |
1007 |
1021 |
1008 def remoteUTStop(self): |
1022 def remoteUTStop(self): |
1009 """ |
1023 """ |
1010 Public method to stop a unittest run. |
1024 Public method to stop a unittest run. |
1011 """ |
1025 """ |
1222 elif method == "ResponseUTPrepared": |
1236 elif method == "ResponseUTPrepared": |
1223 self.debugServer.clientUtPrepared( |
1237 self.debugServer.clientUtPrepared( |
1224 params["count"], params["exception"], params["message"]) |
1238 params["count"], params["exception"], params["message"]) |
1225 |
1239 |
1226 elif method == "ResponseUTFinished": |
1240 elif method == "ResponseUTFinished": |
1227 self.debugServer.clientUtFinished() |
1241 self.debugServer.clientUtFinished(params["status"]) |
1228 |
1242 |
1229 elif method == "ResponseUTStartTest": |
1243 elif method == "ResponseUTStartTest": |
1230 self.debugServer.clientUtStartTest( |
1244 self.debugServer.clientUtStartTest( |
1231 params["testname"], params["description"]) |
1245 params["testname"], params["description"]) |
1232 |
1246 |