#1328 closed defect (fixed)
trac-admin Unit Tests are very slow in trunk
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | 0.9 |
Component: | admin/console | Version: | devel |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
As the unit tests for trac-admin in trunk execute trac-admin and parse its output for each test, they are very slow. On my machine it takes around 75 seconds for all 154 tests to complete. This can be improved by moving the functionality of trac-admin into a module, which the unit tests can then work with. Patch forthcoming.
Attachments (1)
Change History (5)
by , 20 years ago
Attachment: | trac-admin-modularity.patch added |
---|
comment:1 by , 20 years ago
The above patch looks a lot bigger than it really is. The core functionality of trac-admin is moved into a new trac.scripts.admin module. trac-admin is replaced with a three-line script that runs the core code. The unit test now instantiates a TracAdmin object and invokes it's docmd method repeatedly rather than using os.system to execute a new trac-admin instance per command.
comment:2 by , 20 years ago
Oh, I should mention that this patch drops total execution time down to around 14 seconds for the 154 tests.
comment:3 by , 20 years ago
Milestone: | → 0.9 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Minor refactoring of trac-admin