##// END OF EJS Templates
run-test: allow relative path in `--blacklist` and `--whitelist` (issue6351)...
Antoine cezar -
r46086:22140fd7 default
parent child Browse files
Show More
@@ -967,6 +967,7 b' class Test(unittest.TestCase):'
967 if slowtimeout is None:
967 if slowtimeout is None:
968 slowtimeout = defaults['slowtimeout']
968 slowtimeout = defaults['slowtimeout']
969 self.path = path
969 self.path = path
970 self.relpath = os.path.relpath(path)
970 self.bname = os.path.basename(path)
971 self.bname = os.path.basename(path)
971 self.name = _bytes2sys(self.bname)
972 self.name = _bytes2sys(self.bname)
972 self._testdir = os.path.dirname(path)
973 self._testdir = os.path.dirname(path)
@@ -2397,11 +2398,17 b' class TestSuite(unittest.TestSuite):'
2397 result.addSkip(test, "Doesn't exist")
2398 result.addSkip(test, "Doesn't exist")
2398 continue
2399 continue
2399
2400
2400 if not (self._whitelist and test.bname in self._whitelist):
2401 is_whitelisted = self._whitelist and (
2401 if self._blacklist and test.bname in self._blacklist:
2402 test.relpath in self._whitelist or test.bname in self._whitelist
2403 )
2404 if not is_whitelisted:
2405 is_blacklisted = self._blacklist and (
2406 test.relpath in self._blacklist
2407 or test.bname in self._blacklist
2408 )
2409 if is_blacklisted:
2402 result.addSkip(test, 'blacklisted')
2410 result.addSkip(test, 'blacklisted')
2403 continue
2411 continue
2404
2405 if self._keywords:
2412 if self._keywords:
2406 with open(test.path, 'rb') as f:
2413 with open(test.path, 'rb') as f:
2407 t = f.read().lower() + test.bname.lower()
2414 t = f.read().lower() + test.bname.lower()
General Comments 0
You need to be logged in to leave comments. Login now