Mercurial > hg
view tests/blacklists/README @ 25732:b94df10cc3b5
hghave: allow adding customized features at runtime
Before this patch, there is no way to add customized features to
`hghave` without changing `hghave` and `hghave.py` themselves.
This decreases reusability of `run-tests.py` framework for third party
tools, because they may want to examine custom features at runtime
(e.g. existence of some external tools).
To allow adding customized features at runtime, this patch makes
`hghave` import `hghaveaddon` module, only when `hghaveaddon.py` file
can be found in directories below:
- `TESTDIR` for invocation via `run-tests.py`
- `.` for invocation via command line
The path to the directory where `hghaveaddon.py` should be placed is
added to `sys.path` only while importing `hghaveaddon`, because:
- `.` may not be added to `PYTHONPATH`
- adding additional path to `sys.path` may change behavior of
subsequent `import` for other features
`hghave` is terminated with exit code '2' at failure of `import
hghaveaddon`, because exit code '2' terminates `run-tests.py`
immediately.
This is a one of preparations for issue4677.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 03 Jul 2015 06:56:03 +0900 |
parents | c437745f50ec |
children |
line wrap: on
line source
Put here definitions of blacklists for run-tests.py Create a file per blacklist. Each file should list the names of tests that you want to be skipped. File names are meant to be used as targets for run-tests.py --blacklist option. Lines starting with # are ignored. White spaces are stripped. e.g. if you create a blacklist/example file containing: test-hgrc # some comment test-help then calling "run-tests.py --blacklist blacklists/example" will exclude test-hgrc and test-help from the list of tests to run.