[qa] Refactor test_framework and pull tester#7971
Conversation
maflcko
commented
Apr 29, 2016
- log to stdout
- increase range for p2p and rpc ports
- UPPERCASE_CONSTANTS
- Stop nodes on CTRL+C
5f95266 to
fa056ba
Compare
|
|
Anyone interested in looking at the diff here? (It is mostly move-only and cleaning up the logic/ifelses) It is already tested as part of #7972 but I'd prefer to have at least one read the patch. |
qa/rpc-tests/test_framework/util.py
Outdated
There was a problem hiding this comment.
@fanquake @paveljanik done in another commit.
|
|
* log to stdout * increase range for p2p and rpc ports * UPPERCASE_CONSTANTS * Stop nodes on CTRL+C
|
@paveljanik Rebased, so the other doc changes are included as well. |
|
I have a lot of these during tests, but not only in the PR - also applies to current master: |
|
It's just refactoring. Ideally, behavior should stay the same. Also, I can't reproduce. Mind to open a issue for the timeouts? |
qa/pull-tester/rpc-tests.py
Outdated
|
|
||
| if print_help: | ||
| # Help should be the same for all scripts, so just | ||
| # call the first and exit |
There was a problem hiding this comment.
comment ultranit: the help is not actually the same for all scripts, as some tests take custom (optional) arguments.
There was a problem hiding this comment.
This is true, but the previous behavior was to only show the help text of the first script and then exit(0). If someone wants to change the behavior, I'd propose a separate pull. I am happy to change the comment in this pull, though.
|
utACK (feel free to ignore my ultranit) Not sure this needs to be addressed in this PR, but for supporting multiple tests running in parallel, I think it might make sense to add support to the test framework for specifying a range of ports to use for the p2p and rpc ports on the command line, which the |
|
Added a commit to fix @sdaftuar's nit, hopefully. In regard to the ports: I am wondering if it is sufficient to pass in a int |
|
@MarcoFalke Yeah that approach of a single int that defaults to the pid sounds reasonable to me. Comment looks better too, thanks. |
Backport migration from rpc-tests.sh to rpc-tests.py Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6567 - bitcoin/bitcoin#6523 - bitcoin/bitcoin#6616 - bitcoin/bitcoin#6788 - Only the commit fixing `rpc-tests.py` - bitcoin/bitcoin#6791 - Only the fix to `qa/rpc-tests/README.md` - bitcoin/bitcoin#6827 - bitcoin/bitcoin#6930 - bitcoin/bitcoin#6804 - bitcoin/bitcoin#7029 - bitcoin/bitcoin#7028 - bitcoin/bitcoin#7027 - bitcoin/bitcoin#7135 - bitcoin/bitcoin#7209 - bitcoin/bitcoin#7635 - bitcoin/bitcoin#7778 - bitcoin/bitcoin#7851 - bitcoin/bitcoin#7814 - Only the changes to the new .py files in this PR. - bitcoin/bitcoin#7971 - bitcoin/bitcoin#7972 - bitcoin/bitcoin#8056 - Only the first commit. - bitcoin/bitcoin#8098 - bitcoin/bitcoin#8104 - bitcoin/bitcoin#8133 - Only the `rpc-tests.py` commit. - bitcoin/bitcoin#8066 - bitcoin/bitcoin#8216 - Only the last two commits. - bitcoin/bitcoin#8254 - bitcoin/bitcoin#8400 - bitcoin/bitcoin#8482 - Excluding the first commit (only affects RPC tests we don't have). - bitcoin/bitcoin#8551 - bitcoin/bitcoin#8607 - Only the pull-tester commit, for conflict removal. - bitcoin/bitcoin#8625 - bitcoin/bitcoin#8713 - bitcoin/bitcoin#8750 - bitcoin/bitcoin#8789 - bitcoin/bitcoin#9098 - bitcoin/bitcoin#9276 - Excluding the second commit (we don't have the changes it requires). - bitcoin/bitcoin#9657 - bitcoin/bitcoin#9807 - bitcoin/bitcoin#9766 - bitcoin/bitcoin#9823
Backport migration from rpc-tests.sh to rpc-tests.py Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6567 - bitcoin/bitcoin#6523 - bitcoin/bitcoin#6616 - bitcoin/bitcoin#6788 - Only the commit fixing `rpc-tests.py` - bitcoin/bitcoin#6791 - Only the fix to `qa/rpc-tests/README.md` - bitcoin/bitcoin#6827 - bitcoin/bitcoin#6930 - bitcoin/bitcoin#6804 - bitcoin/bitcoin#7029 - bitcoin/bitcoin#7028 - bitcoin/bitcoin#7027 - bitcoin/bitcoin#7135 - bitcoin/bitcoin#7209 - bitcoin/bitcoin#7635 - bitcoin/bitcoin#7778 - bitcoin/bitcoin#7851 - bitcoin/bitcoin#7814 - Only the changes to the new .py files in this PR. - bitcoin/bitcoin#7971 - bitcoin/bitcoin#7972 - bitcoin/bitcoin#8056 - Only the first commit. - bitcoin/bitcoin#8098 - bitcoin/bitcoin#8104 - bitcoin/bitcoin#8133 - Only the `rpc-tests.py` commit. - bitcoin/bitcoin#8066 - bitcoin/bitcoin#8216 - Only the last two commits. - bitcoin/bitcoin#8254 - bitcoin/bitcoin#8400 - bitcoin/bitcoin#8482 - Excluding the first commit (only affects RPC tests we don't have). - bitcoin/bitcoin#8551 - bitcoin/bitcoin#8607 - Only the pull-tester commit, for conflict removal. - bitcoin/bitcoin#8625 - bitcoin/bitcoin#8713 - bitcoin/bitcoin#8750 - bitcoin/bitcoin#8789 - bitcoin/bitcoin#9098 - bitcoin/bitcoin#9276 - Excluding the second commit (we don't have the changes it requires). - bitcoin/bitcoin#9657 - bitcoin/bitcoin#9807 - bitcoin/bitcoin#9766 - bitcoin/bitcoin#9823