ci: Fix and enable tests on Windows#22922
Conversation
|
In the tests that use the P2P interface, I am running into event loop (garbage collection) issues, but this hack works around them: diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index f382e0fdb3..0b7ef1c803 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -152,7 +152,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
self.success = TestStatus.FAILED
finally:
exit_code = self.shutdown()
- sys.exit(exit_code)
+ os._exit(exit_code)
def parse_args(self):
previous_releases_path = os.getenv("PREVIOUS_RELEASES_DIR") or os.getcwd() + "/releases" |
|
Concept ACK.
I also saw such issues while working on the same problem.
That is great! Any link to an explanation or so (just curios)? |
|
https://api.cirrus-ci.com/v1/task/5800162858631168/logs/functional_tests.log: |
fa0d5b9 to
fa86222
Compare
I have no idea, but |
|
"Win64 native" is GREEN 🐅 |
fa86222 to
fa0c194
Compare
|
Almost ACK fa0c194 Locally I've got an error: I think, the python setup on my Windows machine is broken somehow. UPDATE: Sorry for my mistake. Just forgot to |
hebasto
left a comment
There was a problem hiding this comment.
ACK fa0c194, tested locally on Windows 10 Pro 20H2 (build 19042.1165):
>python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --jobs=4 --timeout-factor=8 rpc_help feature_config_args rpc_signer feature_presegwit_node_upgrade "tool_wallet.py --descriptors" --failfast
Running Unit Tests for Test Framework Modules
..........
----------------------------------------------------------------------
Ran 10 tests in 0.769s
OK
Remaining jobs: [rpc_help.py, feature_config_args.py, feature_presegwit_node_upgrade.py, tool_wallet.py --descriptors]
Remaining jobs: [rpc_help.py, feature_config_args.py, tool_wallet.py --descriptors]
Remaining jobs: [feature_config_args.py, tool_wallet.py --descriptors]
Remaining jobs: [tool_wallet.py --descriptors]
TEST | STATUS | DURATION
feature_config_args.py | ✓ Passed | 112 s
feature_presegwit_node_upgrade.py | ✓ Passed | 27 s
rpc_help.py | ✓ Passed | 33 s
rpc_signer.py | ✓ Passed | 23 s
tool_wallet.py --descriptors | ✓ Passed | 104 s
ALL | ✓ Passed | 299 s (accumulated)
Runtime: 127 s
…ts on Windows c427a58 doc: Set PYTHONUTF8=1 for functional tests on Windows (Hennadii Stepanov) Pull request description: The `PYTHONUTF8` environment variable is defined in [PEP 540](https://www.python.org/dev/peps/pep-0540/), and it is actually used in our CI: https://github.com/bitcoin/bitcoin/blob/5e3380b9f59481fc18e05b9d651c3c733abe4053/.cirrus.yml#L89 This PR documents such usage to avoid users' [errors](bitcoin/bitcoin#22922 (comment)). ACKs for top commit: MarcoFalke: cr ACK c427a58 Tree-SHA512: 441b8cecfe47d548cfe403b0e1cd0aef25c1a70ff556434ead1f1e26372919931ac6f208a4ed6fd8dcca46e8709245e4fb06f95259a43c8e1221473ce1ee497b
…ndows c427a58 doc: Set PYTHONUTF8=1 for functional tests on Windows (Hennadii Stepanov) Pull request description: The `PYTHONUTF8` environment variable is defined in [PEP 540](https://www.python.org/dev/peps/pep-0540/), and it is actually used in our CI: https://github.com/bitcoin/bitcoin/blob/5e3380b9f59481fc18e05b9d651c3c733abe4053/.cirrus.yml#L89 This PR documents such usage to avoid users' [errors](bitcoin#22922 (comment)). ACKs for top commit: MarcoFalke: cr ACK c427a58 Tree-SHA512: 441b8cecfe47d548cfe403b0e1cd0aef25c1a70ff556434ead1f1e26372919931ac6f208a4ed6fd8dcca46e8709245e4fb06f95259a43c8e1221473ce1ee497b
Fixed in #22987. |
…ndows c427a58 doc: Set PYTHONUTF8=1 for functional tests on Windows (Hennadii Stepanov) Pull request description: The `PYTHONUTF8` environment variable is defined in [PEP 540](https://www.python.org/dev/peps/pep-0540/), and it is actually used in our CI: https://github.com/bitcoin/bitcoin/blob/5e3380b9f59481fc18e05b9d651c3c733abe4053/.cirrus.yml#L89 This PR documents such usage to avoid users' [errors](bitcoin#22922 (comment)). ACKs for top commit: MarcoFalke: cr ACK c427a58 Tree-SHA512: 441b8cecfe47d548cfe403b0e1cd0aef25c1a70ff556434ead1f1e26372919931ac6f208a4ed6fd8dcca46e8709245e4fb06f95259a43c8e1221473ce1ee497b
Only a cherry-picked list.
--extendedcan be enabled in a follow-up.