This is an archive of the discontinued Mercurial Phabricator instance.

run-test: allow relative path in `--blacklist` and `--whitelist` (issue6351)
ClosedPublic

Authored by acezar on Sep 17 2020, 4:57 AM.

Details

Summary

When specifying a test with --blacklist or --whitelist with path relatives
to the repository root (eg: tests/test-check-commit.t) the file is not taken
into account. It only works when the name of the test is given.

It would be better if --blacklist and --whitelist behaviors where compatible
with --test-list.

This patch allows to use relative path with --blacklist and --whitelist
while staying compatible with the old behavior by checking the test relative
path in addition to its name.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

acezar created this revision.Sep 17 2020, 4:57 AM
Alphare accepted this revision.Sep 17 2020, 8:02 AM
pulkit added a subscriber: pulkit.Sep 17 2020, 8:43 AM
pulkit added inline comments.
tests/run-tests.py
1002

We can just have this as another class variable.

Missed adding, for bug fixes, we specify bug id at end of commit message. https://www.mercurial-scm.org/wiki/ContributingChanges#Patch_descriptions

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).Sep 17 2020, 11:49 AM
acezar edited the summary of this revision. (Show Details)
acezar updated this revision to Diff 22677.
acezar marked an inline comment as done.Sep 18 2020, 4:32 AM
acezar edited the summary of this revision. (Show Details)
acezar updated this revision to Diff 22716.

Missed adding, for bug fixes, we specify bug id at end of commit message. https://www.mercurial-scm.org/wiki/ContributingChanges#Patch_descriptions

Improved the commit message.

pulkit accepted this revision.Sep 18 2020, 10:43 AM
This revision is now accepted and ready to land.Sep 18 2020, 10:43 AM
martinvonz added inline comments.
tests/run-tests.py
2410–2411

Black wanted these two lines to be joined. I'll fix it in flight.