##// END OF EJS Templates
run-tests: stop storing start/stop times in a dict by test name...
Augie Fackler -
r24331:d3bdd8c7 default
parent child Browse files
Show More
@@ -1142,8 +1142,6 b' class TestResult(unittest._TextTestResul'
1142 self.warned = []
1142 self.warned = []
1143
1143
1144 self.times = []
1144 self.times = []
1145 self._started = {}
1146 self._stopped = {}
1147 # Data stored for the benefit of generating xunit reports.
1145 # Data stored for the benefit of generating xunit reports.
1148 self.successes = []
1146 self.successes = []
1149 self.faildata = {}
1147 self.faildata = {}
@@ -1265,21 +1263,18 b' class TestResult(unittest._TextTestResul'
1265 # child's processes along with real elapsed time taken by a process.
1263 # child's processes along with real elapsed time taken by a process.
1266 # This module has one limitation. It can only work for Linux user
1264 # This module has one limitation. It can only work for Linux user
1267 # and not for Windows.
1265 # and not for Windows.
1268 self._started[test.name] = os.times()
1266 test.started = os.times()
1269
1267
1270 def stopTest(self, test, interrupted=False):
1268 def stopTest(self, test, interrupted=False):
1271 super(TestResult, self).stopTest(test)
1269 super(TestResult, self).stopTest(test)
1272
1270
1273 self._stopped[test.name] = os.times()
1271 test.stopped = os.times()
1274
1272
1275 starttime = self._started[test.name]
1273 starttime = test.started
1276 endtime = self._stopped[test.name]
1274 endtime = test.stopped
1277 self.times.append((test.name, endtime[2] - starttime[2],
1275 self.times.append((test.name, endtime[2] - starttime[2],
1278 endtime[3] - starttime[3], endtime[4] - starttime[4]))
1276 endtime[3] - starttime[3], endtime[4] - starttime[4]))
1279
1277
1280 del self._started[test.name]
1281 del self._stopped[test.name]
1282
1283 if interrupted:
1278 if interrupted:
1284 iolock.acquire()
1279 iolock.acquire()
1285 self.stream.writeln('INTERRUPTED: %s (after %d seconds)' % (
1280 self.stream.writeln('INTERRUPTED: %s (after %d seconds)' % (
General Comments 0
You need to be logged in to leave comments. Login now