testr load should display failures incrementally
Bug #613152 reported by
Jonathan Lange
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Testrepository |
Fix Released
|
Wishlist
|
Jonathan Lange |
Bug Description
"testr load" currently waits for the tests to finish running before displaying any output. This sucks for slow tests. Ideally, it would display failure information as it gets it.
Related branches
lp://staging/~jml/testrepository/show-failures-incrementally-613152
- Robert Collins: Approve
-
Diff: 884 lines (+334/-143)16 files modifiedtestrepository/commands/__init__.py (+0/-21)
testrepository/commands/failing.py (+21/-22)
testrepository/commands/last.py (+7/-15)
testrepository/commands/load.py (+15/-15)
testrepository/results.py (+13/-0)
testrepository/tests/__init__.py (+17/-0)
testrepository/tests/commands/test_failing.py (+16/-7)
testrepository/tests/commands/test_last.py (+3/-5)
testrepository/tests/commands/test_load.py (+9/-6)
testrepository/tests/test_matchers.py (+17/-0)
testrepository/tests/test_results.py (+28/-0)
testrepository/tests/test_ui.py (+9/-8)
testrepository/tests/ui/test_cli.py (+63/-5)
testrepository/ui/__init__.py (+49/-12)
testrepository/ui/cli.py (+22/-24)
testrepository/ui/model.py (+45/-3)
Changed in testrepository: | |
status: | Triaged → In Progress |
assignee: | nobody → Jonathan Lange (jml) |
Changed in testrepository: | |
status: | In Progress → Fix Committed |
Changed in testrepository: | |
milestone: | none → next |
Changed in testrepository: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I've tried fixing this bug, but I'm finding it pretty hard to disentangle.
Some random thoughts: output_ run() basically requires the full output to be ready before it is called, so it's hard to produce incremental output without going outside the Command framework.
* Command.
* Maybe testrepository UIs should have their own thing that implements TestResult and can choose how to display them.
* The "output_stream" temporary variable should be deleted, and "output" renamed to "output_stream". It would make the code easier to read.