##// END OF EJS Templates
hghave: allow adding customized features at runtime...
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.

File last commit:

r25474:8c14f87b default
r25732:b94df10c default
Show More
test-bad-pull.t
21 lines | 437 B | text/troff | Tads3Lexer
Mike Hommey
tests: pull common http server setup out of individual tests...
r22959 #require serve killdaemons
Mads Kiilerich
tests: use 'hghave serve' to guard tests that requires serve daemon management
r15446
Adrian Buehlmann
test-bad-pull: partially adjust for Windows...
r17019 #if windows
$ hg clone http://localhost:$HGPORT/ copy
abort: * (glob)
[255]
#else
Martin Geisler
tests: unify test-bad-pull
r11859 $ hg clone http://localhost:$HGPORT/ copy
abort: error: Connection refused
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Adrian Buehlmann
test-bad-pull: partially adjust for Windows...
r17019 #endif
Martin Geisler
tests: unify test-bad-pull
r11859
Mads Kiilerich
tests: remove hacks for testing if file or directory exists
r15515 $ test -d copy
[1]
Martin Geisler
tests: unify test-bad-pull
r11859
Mike Hommey
tests: pull common http server setup out of individual tests...
r22959 $ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
$ cat dumb.pid >> $DAEMON_PIDS
Matt Mackall
tests: fix shutdown race in test-bad-pull
r16334 $ hg clone http://localhost:$HGPORT/foo copy2
abort: HTTP Error 404: * (glob)
[255]
Matt Mackall
tests: drop DAEMON_PIDS from killdaemons calls
r25474 $ killdaemons.py