diff options
author | Ava Chow <github@achow101.com> | 2024-09-05 18:29:25 -0400 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-09-05 18:29:25 -0400 |
commit | fa460884406b35b0dee75af23f42e8b4c4acbebc (patch) | |
tree | 1415822945c0f7370da2639fc268f2fc9bbd0c9e /test/functional/test_framework/test_shell.py | |
parent | 88f0419c1ab1e5f3ccf425435e530d8ceb72c7f1 (diff) | |
parent | b2a137929a20baed161988e24de592b1f59c0096 (diff) |
Merge bitcoin/bitcoin#30762: [28.x] rc backports
b2a137929a20baed161988e24de592b1f59c0096 depends: build libevent with -D_GNU_SOURCE (fanquake)
199bb09d88e28d951c5068eb65643390dbedd066 test: fixing failing system_tests/run_command under some Locales (Jadi)
342baabaffc385dc44a44f6d8cf32728a25a0356 test: Avoid intermittent timeout in p2p_headers_sync_with_minchainwork.py (MarcoFalke)
5577d5a3c0904a4805e7b768cb60144daa2a0854 test: fix `TestShell` initialization (late follow-up for #30463) (Sebastian Falbesoner)
Pull request description:
Backports:
* https://github.com/bitcoin/bitcoin/pull/30714
* https://github.com/bitcoin/bitcoin/pull/30743
* https://github.com/bitcoin/bitcoin/pull/30761
* https://github.com/bitcoin/bitcoin/pull/30788
ACKs for top commit:
willcl-ark:
ACK b2a137929a20baed161988e24de592b1f59c0096
achow101:
ACK b2a137929a20baed161988e24de592b1f59c0096
stickies-v:
ACK b2a137929a20baed161988e24de592b1f59c0096
Tree-SHA512: bf08ac0c613395def974a1b287345d4a64edc066c14f8c9f0184478b0e33e48333760eeb6e96b6b5fbafbb21b40d01875e3f526213a2734e226b2e111d71f3a3
Diffstat (limited to 'test/functional/test_framework/test_shell.py')
-rw-r--r-- | test/functional/test_framework/test_shell.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/functional/test_framework/test_shell.py b/test/functional/test_framework/test_shell.py index 09ccec28a1..e232430507 100644 --- a/test/functional/test_framework/test_shell.py +++ b/test/functional/test_framework/test_shell.py @@ -2,9 +2,11 @@ # Copyright (c) 2019-2022 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. +import pathlib from test_framework.test_framework import BitcoinTestFramework + class TestShell: """Wrapper Class for BitcoinTestFramework. @@ -67,7 +69,13 @@ class TestShell: # This implementation enforces singleton pattern, and will return the # previously initialized instance if available if not TestShell.instance: - TestShell.instance = TestShell.__TestShell() + # BitcoinTestFramework instances are supposed to be constructed with the path + # of the calling test in order to find shared data like configuration and the + # cache. Since TestShell is meant for interactive use, there is no concrete + # test; passing a dummy name is fine though, as only the containing directory + # is relevant for successful initialization. + tests_directory = pathlib.Path(__file__).resolve().parent.parent + TestShell.instance = TestShell.__TestShell(tests_directory / "testshell_dummy.py") TestShell.instance.running = False return TestShell.instance |