[Updated] D9024: run-test: allow relative path in `--blacklist` and `--whitelist` (issue6351)
acezar (Antoine Cezar)
phabricator at mercurial-scm.org
Thu Sep 17 15:50:06 UTC 2020
acezar edited the summary of this revision.
acezar retitled this revision from "run-test: make `--blacklist` and `--whitelist` behave like `--test-list`" to "run-test: allow relative path in `--blacklist` and `--whitelist` (issue6351)".
acezar updated this revision to Diff 22677.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D9024?vs=22659&id=22677
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D9024/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D9024
AFFECTED FILES
tests/run-tests.py
CHANGE DETAILS
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2397,11 +2397,18 @@
result.addSkip(test, "Doesn't exist")
continue
- if not (self._whitelist and test.bname in self._whitelist):
- if self._blacklist and test.bname in self._blacklist:
+ is_whitelisted = self._whitelist and (
+ test.relpath in self._whitelist
+ or test.bname in self._whitelist
+ )
+ if not is_whitelisted:
+ is_blacklisted = self._blacklist and (
+ test.relpath in self._blacklist
+ or test.bname in self._blacklist
+ )
+ if is_blacklisted:
result.addSkip(test, 'blacklisted')
continue
-
if self._keywords:
with open(test.path, 'rb') as f:
t = f.read().lower() + test.bname.lower()
To: acezar, #hg-reviewers, Alphare
Cc: pulkit, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200917/47a2dde1/attachment-0002.html>
More information about the Mercurial-patches
mailing list