Tests: Order Python Tests Differently#10219
Conversation
|
@jimmysong thanks for opening this. I like the concept, but I wonder whether the approach is over-fitted:
Luckily, I don't think we really need to optimize this so drastically. We just need to make sure the long-running extended tests stay at the top of the list when they're merged. I have a much simpler changeset that does that here: https://github.com/jnewbery/bitcoin/tree/mergelistsintelligently but I haven't PR'ed it because I didn't get round to testing/benchmarking it. I'm very happy for you to pick that up and PR it if you think it's useful. ACK the README update. That's useful advice. I'm neutral on changing the names from _SCRIPTS to _TESTS. Any specific reason you want to do that? |
Glad to proceed on one approach or the other, should I wait for more comments or proceed on a simpler, minimally disruptive approach? |
|
Indeed, the requirement is only that the longest test don't come last in the list. For all the quick tests it is not really important. I think the current approach/ordering is sufficient. |
|
@jimmysong I'd go for zipping the lists together rather than concatenating them. When running extended tests, the fact that pruning isn't started immediately is a a big loss. If we can fix that with a one-line change, let's go ahead and do it. Let's stick to the _SCRIPTS naming convention. |
* Added documentation in tests/README.md about enabling wallet, utils and daemon. * Change ordering to make the long-running EXTENDED_TESTS go first.
ad623cf to
637706d
Compare
|
I wanted to do the minimal change to get what we wanted and I just placed the EXTENDED_SCRIPTS first. Just wanting your thoughts on this. If you don't like it, I'll change this to zipping them per @jnewbery's branch. |
|
Have you tested and benchmarked? What are the elapsed runtimes before and after this PR? How about with zipping the two lists together? utACK 637706d. It seems like this should be faster to execute than the current ordering. |
|
@jnewbery tested (--extended) and got 1671s runtime with this patch vs 1882s runtime without. A savings of roughly 3-4 minutes. |
637706d Tests: Put Extended tests first when they're included (Jimmy Song) Tree-SHA512: 0a720b2443b3e65f4ad548ecdf822468460fc4f4ecf32385dd79511a01c9ea4c94f0bf765ca593705b19baee1bae254dfcc3952da64b9c51d75b7da7abcdcd28
637706d Tests: Put Extended tests first when they're included (Jimmy Song) Tree-SHA512: 0a720b2443b3e65f4ad548ecdf822468460fc4f4ecf32385dd79511a01c9ea4c94f0bf765ca593705b19baee1bae254dfcc3952da64b9c51d75b7da7abcdcd28
Uh oh!
There was an error while loading. Please reload this page.