Merge lp://staging/~mbp/bzr/test-timeout into lp://staging/bzr
Proposed by
Martin Pool
Status: | Merged |
---|---|
Approved by: | Vincent Ladeuil |
Approved revision: | no longer in the source branch. |
Merged at revision: | 6320 |
Proposed branch: | lp://staging/~mbp/bzr/test-timeout |
Merge into: | lp://staging/bzr |
Diff against target: |
109 lines (+45/-1) 5 files modified
Makefile (+2/-1) bzrlib/config.py (+8/-0) bzrlib/tests/__init__.py (+10/-0) bzrlib/tests/fixtures.py (+20/-0) doc/en/release-notes/bzr-2.5.txt (+5/-0) |
To merge this branch: | bzr merge lp://staging/~mbp/bzr/test-timeout |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vincent Ladeuil | Needs Fixing | ||
Review via email: mp+83559@code.staging.launchpad.net |
Commit message
bzr selftest tests fail after a configurable timeout
Description of the change
We had some problems recently where tests got stuck indefinitely on pqm.
This adds an option selftest.timeout that will cause the tests to abort after that much time, on unix only.
I'm not sure what the default should be. It will be annoying if you're debugging the test and it aborts. On the other hand for most contexts blocking indefinitely is not good.
This will only cover Unix since it relies on alarm().
To post a comment you must log in.
[beware] of conflicts
[cautious] I would set the alarm even before checking the test features, something can go wrong there too
[PEP8] line too long TimeoutFixture( config. GlobalStack( ).get(' selftest. timeout' ))
36 + timeout_fixture = fixtures.
[clarity]
72 + self.alarm_fn = getattr(signal, 'alarm', None)
This could go into __init__ and the other methods can then use 'if self.alarm_fn is not None'.
This is worth a news entry explaining how it will manifest itself ?