Page MenuHomePhabricator

qa: Make extended tests pass on native Windows
ClosedPublic

Authored by Fabien on May 5 2020, 11:22.

Details

Summary
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.

Backport of core PR13867.

Test Plan
ninja check-functional

*The following needs D5959.*
Build for windows, then:

  • Install python if needed and add it to your path
  • If you copy the project to some place, you need at least the src,

test, share and your build directories.

  • Copy the test_runner.py to the build directory to replace the symlink
  • Update the config.ini file to match you paths

Then in a powershell:

$env:PYTHONIOENCODING="utf-8"
python .\test\functional\test_runner.py --force feature_help
python .\test\functional\test_runner.py --force rpc_users

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.May 5 2020, 11:22

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.May 5 2020, 14:00