diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-08-11 07:01:29 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-08-11 07:01:37 -0400 |
commit | 1b04b55f2d22078ca79cd38fc1078e15fa9cbe94 (patch) | |
tree | 9cac1117ef231937f55691675861baa546afcfc8 /test/functional/rpc_users.py | |
parent | a04888a075506c3cafe1d188c204bcb440089566 (diff) | |
parent | fafe73a626d9d935402e3d488c07cc36a57b1850 (diff) |
Merge #13867: qa: Make extended tests pass on native Windows
fafe73a626 qa: Raise feature_help timeout to 5s (MarcoFalke)
faabd7bc47 qa: Use files for stdout/stderr to support Windows (MarcoFalke)
facb56ffaf qa: Run gen_rpcauth with sys.executable (MarcoFalke)
fada8966c5 qa: Close stdout and stderr file when node stops (MarcoFalke)
Pull request description:
### qa: Close stdout and stderr file when node stops
Since these files are potentially deleted by the test framework for cleanup, they should be closed first. Otherwise this will lead to errors on Windows when the tests finish successfully.
Side note: After the patch, it is no longer possible to reopen the file on Windows (see https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile)
### qa: Run gen_rpcauth with sys.executable
Similar to `test_runner.py`, the `sys.executable` needs to be passed down into subprocesses to pass on native Windows. (Should have no effect on Linux)
### qa: Use files for stdout/stderr to support Windows
It seems that using PIPE is not supported on Windows. Also, it is easier to just use the files that capture the stdout and stderr within the test node class.
Tree-SHA512: ec675012b10705978606b7fcbdb287c39a8e6e3732aae2fa4041d963a3c6993c6eac6a9a3cbd5479514e7d8017fe74c12235d1ed6fed2e8af8f3c71981e91864
Diffstat (limited to 'test/functional/rpc_users.py')
-rwxr-xr-x | test/functional/rpc_users.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/rpc_users.py b/test/functional/rpc_users.py index d631cd022b..102dd22594 100755 --- a/test/functional/rpc_users.py +++ b/test/functional/rpc_users.py @@ -18,6 +18,7 @@ import subprocess from random import SystemRandom import string import configparser +import sys class HTTPBasicsTest(BitcoinTestFramework): @@ -36,7 +37,7 @@ class HTTPBasicsTest(BitcoinTestFramework): config = configparser.ConfigParser() config.read_file(open(self.options.configfile)) gen_rpcauth = config['environment']['RPCAUTH'] - p = subprocess.Popen([gen_rpcauth, self.user], stdout=subprocess.PIPE, universal_newlines=True) + p = subprocess.Popen([sys.executable, gen_rpcauth, self.user], stdout=subprocess.PIPE, universal_newlines=True) lines = p.stdout.read().splitlines() rpcauth3 = lines[1] self.password = lines[3] |