Show More
@@ -1236,6 +1236,7 b' class TTest(Test):' | |||
|
1236 | 1236 | self.name = '%s (case %s)' % (self.name, _strpath(case)) |
|
1237 | 1237 | self.errpath = b'%s.%s.err' % (self.errpath[:-4], case) |
|
1238 | 1238 | self._tmpname += b'-%s' % case |
|
1239 | self._have = {} | |
|
1239 | 1240 | |
|
1240 | 1241 | @property |
|
1241 | 1242 | def refpath(self): |
@@ -1275,11 +1276,15 b' class TTest(Test):' | |||
|
1275 | 1276 | return self._processoutput(exitcode, output, salt, after, expected) |
|
1276 | 1277 | |
|
1277 | 1278 | def _hghave(self, reqs): |
|
1279 | allreqs = b' '.join(reqs) | |
|
1280 | if allreqs in self._have: | |
|
1281 | return self._have.get(allreqs) | |
|
1282 | ||
|
1278 | 1283 | # TODO do something smarter when all other uses of hghave are gone. |
|
1279 | 1284 | runtestdir = os.path.abspath(os.path.dirname(_bytespath(__file__))) |
|
1280 | 1285 | tdir = runtestdir.replace(b'\\', b'/') |
|
1281 | 1286 | proc = Popen4(b'%s -c "%s/hghave %s"' % |
|
1282 |
(self._shell, tdir, |
|
|
1287 | (self._shell, tdir, allreqs), | |
|
1283 | 1288 | self._testtmp, 0, self._getenv()) |
|
1284 | 1289 | stdout, stderr = proc.communicate() |
|
1285 | 1290 | ret = proc.wait() |
@@ -1290,10 +1295,13 b' class TTest(Test):' | |||
|
1290 | 1295 | sys.exit(1) |
|
1291 | 1296 | |
|
1292 | 1297 | if ret != 0: |
|
1298 | self._have[allreqs] = (False, stdout) | |
|
1293 | 1299 | return False, stdout |
|
1294 | 1300 | |
|
1295 | 1301 | if b'slow' in reqs: |
|
1296 | 1302 | self._timeout = self._slowtimeout |
|
1303 | ||
|
1304 | self._have[allreqs] = (True, None) | |
|
1297 | 1305 | return True, None |
|
1298 | 1306 | |
|
1299 | 1307 | def _iftest(self, args): |
General Comments 0
You need to be logged in to leave comments.
Login now