-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Enable python regression test for Windows #6548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
No need to close/open PRs to get them to rebuild, just force-push the changes. What's the problem with run-bitcoin-cli on windows? Is it just that it's missing an extension? If so, does making it a ".sh" fix the problem? The wrapper is necessary (at least on Linux) to compare output with expected EOLs. Do these tests pass on a native windows machine? |
run-bitcoin-cli does not run on native windows as a subprocess invoked These tests run fine on native windows until it gets to rest.py where it I think the problem I'm seeing here in the travis build is the script is On 11/08/2015 10:16 AM, Cory Fields wrote:
|
Rather than adding to the quirks here, it'd probably be easier to just move rpc-tests.sh/tests-config.sh/run-bitcoin-cli all to python, then use the vars directly. I think that would untangle this a bit. |
I think on a more elegant solution... but first after i was able to compile the master-branch, i ran the py test suite but the main problem appears to be that the very first python script get On 11/08/2015 11:39 AM, Cory Fields wrote:
|
Migrating the scripts to Python is always a good thing in my book. +1 |
Moving |
return open("NUL", "w+") | ||
else: | ||
return open("/dev/null", "w+") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The devnull switch is not required.
I think you can do devnull = open(os.devnull, 'w')
at L96 and L188.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll add that
On 12/08/2015 6:12 AM, Jonas Schnelli wrote:
In qa/rpc-tests/test_framework/util.py
#6548 (comment):@@ -20,6 +20,12 @@
from authproxy import AuthServiceProxy, JSONRPCException
from util import *+def null_file():
- if os.name == 'nt':
return open("NUL", "w+")
- else:
- return open("/dev/null", "w+")
The devnull switch is not required.
I think you can do |devnull = open(os.devnull, 'w')| at L96 and L188.—
Reply to this email directly or view it on GitHub
https://github.com/bitcoin/bitcoin/pull/6548/files#r36857141.
I had to finally disable the windows tests because the syncing of nodes on windows is even worse during the Travis build. However the tests do run on a native windows machine if they are enabled in rpc-tests.sh I think this code is ready to be reviewed and merged. I'd prefer to clean up the already existing tangle of shell scripts and move everything to python in a separate pull if you all agree. |
Would you mind squashing some of the commits together? |
done... On 15/08/2015 1:51 AM, MarcoFalke wrote:
|
shutil.rmtree(self.options.tmpdir + "/node2/regtest/blocks") | ||
shutil.rmtree(self.options.tmpdir + "/node2/regtest/chainstate") | ||
|
||
# Restore wallets from backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor "whitespace typo"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
I have the code ready which ports everything to python and gets rid of On 12/08/2015 12:05 AM, Wladimir J. van der Laan wrote:
|
@@ -130,9 +128,7 @@ def main(self): | |||
traceback.print_tb(sys.exc_info()[2]) | |||
|
|||
if not self.options.noshutdown: | |||
print("Stopping nodes") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason of removing this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gets printed out when stop_nodes() is called. No need to print it
out twice.
On 20/08/2015 8:56 AM, Jonas Schnelli wrote:
In qa/rpc-tests/test_framework/test_framework.py
#6548 (comment):@@ -130,9 +128,7 @@ def main(self):
traceback.print_tb(sys.exc_info()[2])if not self.options.noshutdown:
print("Stopping nodes")
What's the reason of removing this line?
—
Reply to this email directly or view it on GitHub
https://github.com/bitcoin/bitcoin/pull/6548/files#r37546694.
Tend to NACK. Maybe removing all unnecessary changes (refactoring, log informations, workaround) and just fix the minimum plus the root cause of #6554 (in the code and not in the tests). |
Agreed with @jonasschnelli. Don't break the tests, fix the failures. Fwiw, this is necessary to get the tests passing via Wine in Linux with no futher work-arounds: theuni@5d2f9fc |
@theuni After #6590 was merged I have taken out the changes to travis.yml and it looks good. All tests passed. Just a reminder #6590 only enables windows tests to run on Wine and allows the Travis builds to pass, but not enable them to be run on Native Windows. The changes in this pull request will still be needed. |
Hmm, I thought that would've failed on Travis. After looking more closely, we no longer test any output from bitcoin-cli. So the line-endings and wrapper-script are now moot. You can drop the if case in rpc-tests.sh and just make it very simple: export BITCOINCLI=${REAL_BITCOINCLI}
export BITCOIND=${REAL_BITCOIND} qa/pull-tester/run-bitcoin-cli can be deleted as well. |
great, I was wondering why that was still needed ... deleted On 26/08/2015 9:12 AM, Cory Fields wrote:
|
Why were wallet/walletbackup tests disabled? |
opps, accidentally commented out a couple of scripts will try it again. On 26/08/2015 9:12 AM, Cory Fields wrote:
|
@ptschip Need to remove the entry for run-bitcoin-cli in EXTRA_DIST from Makefile.am. |
I uploaded the changes but all the builds are failing, however, the Cleaning up Tests successful The command "if [ "$RUN_TESTS" = "true" ]; then cache.2 store build cache 9.92schange detected: ... changes detected, packing new archive . uploading archive after_script 0.01s$ {:"if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo /home/travis/build.sh: line 41: scp -r Done. Your build exited with 1. On 26/08/2015 9:31 AM, Cory Fields wrote:
|
ah...ok On 26/08/2015 10:04 AM, Cory Fields wrote:
|
all looks good now On 26/08/2015 10:04 AM, Cory Fields wrote:
|
ACK after squashing the last 2 commits. |
1) Multiplatorm support for devnull 2) Fixed a bug in the handling of cache files 3) Deleted run-bitcoin-cli as no longer needed
Done. On 26/08/2015 10:58 AM, Cory Fields wrote:
|
ACK. Thanks for sticking with it :) |
ACK. |
@laanwj Any idea if/when this can be merged? I have a couple pulls I'd like to submit that depend on this one...(sorry if I'm sounding pushy, I'm new here and I don't know entirely how you operate yet) |
060058e Enable python tests for Native Windows (ptschip)
Sorry, missed this and it got delayed a bit. I really need to start filtering github-mail and bitcoin-dev to different mailboxes. |
Backport RPC test harness PRs Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6548 - bitcoin/bitcoin#6804 - Just the coverage backend, not the flag to enable it. - bitcoin/bitcoin#7744 - bitcoin/bitcoin#9832 - Excludes `wallet-hd.py` change (missing bitcoin/bitcoin#8309). Part of #2074.
Backport RPC test harness PRs Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6548 - bitcoin/bitcoin#6804 - Just the coverage backend, not the flag to enable it for all RPC tests. - bitcoin/bitcoin#7744 - bitcoin/bitcoin#9832 - Excludes `wallet-hd.py` change (missing bitcoin/bitcoin#8309). Part of #2074.
Two files changed:
not get invoked as python can not invoke this on a windows machine
Also, although not required added some additional handling of cache files in the event
that one or more are missing as happened while I was debugging.