mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 06:49:38 -04:00
test: Add imports for util bpf_cflags
This is required for the next commit.
This commit is contained in:
parent
82d1e94838
commit
fa0c1baaf8
6 changed files with 30 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Copyright (c) 2022 The Bitcoin Core developers
|
# Copyright (c) 2022-present The Bitcoin Core developers
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ from test_framework.util import (
|
||||||
assert_equal,
|
assert_equal,
|
||||||
assert_greater_than,
|
assert_greater_than,
|
||||||
assert_raises_rpc_error,
|
assert_raises_rpc_error,
|
||||||
|
bpf_cflags,
|
||||||
)
|
)
|
||||||
|
|
||||||
coinselection_tracepoints_program = """
|
coinselection_tracepoints_program = """
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Copyright (c) 2022 The Bitcoin Core developers
|
# Copyright (c) 2022-present The Bitcoin Core developers
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
@ -20,7 +20,10 @@ from test_framework.blocktools import COINBASE_MATURITY
|
||||||
from test_framework.messages import COIN, DEFAULT_MEMPOOL_EXPIRY_HOURS
|
from test_framework.messages import COIN, DEFAULT_MEMPOOL_EXPIRY_HOURS
|
||||||
from test_framework.p2p import P2PDataStore
|
from test_framework.p2p import P2PDataStore
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.util import assert_equal
|
from test_framework.util import (
|
||||||
|
assert_equal,
|
||||||
|
bpf_cflags,
|
||||||
|
)
|
||||||
from test_framework.wallet import MiniWallet
|
from test_framework.wallet import MiniWallet
|
||||||
|
|
||||||
MEMPOOL_TRACEPOINTS_PROGRAM = """
|
MEMPOOL_TRACEPOINTS_PROGRAM = """
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Copyright (c) 2022 The Bitcoin Core developers
|
# Copyright (c) 2022-present The Bitcoin Core developers
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
@ -17,7 +17,11 @@ except ImportError:
|
||||||
from test_framework.messages import CBlockHeader, MAX_HEADERS_RESULTS, msg_headers, msg_version
|
from test_framework.messages import CBlockHeader, MAX_HEADERS_RESULTS, msg_headers, msg_version
|
||||||
from test_framework.p2p import P2PInterface
|
from test_framework.p2p import P2PInterface
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.util import assert_equal, assert_greater_than
|
from test_framework.util import (
|
||||||
|
assert_equal,
|
||||||
|
assert_greater_than,
|
||||||
|
bpf_cflags,
|
||||||
|
)
|
||||||
|
|
||||||
# Tor v3 addresses are 62 chars + 6 chars for the port (':12345').
|
# Tor v3 addresses are 62 chars + 6 chars for the port (':12345').
|
||||||
MAX_PEER_ADDR_LENGTH = 68
|
MAX_PEER_ADDR_LENGTH = 68
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Copyright (c) 2022 The Bitcoin Core developers
|
# Copyright (c) 2022-present The Bitcoin Core developers
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
@ -15,7 +15,10 @@ except ImportError:
|
||||||
pass
|
pass
|
||||||
from test_framework.messages import COIN
|
from test_framework.messages import COIN
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.util import assert_equal
|
from test_framework.util import (
|
||||||
|
assert_equal,
|
||||||
|
bpf_cflags,
|
||||||
|
)
|
||||||
from test_framework.wallet import MiniWallet
|
from test_framework.wallet import MiniWallet
|
||||||
|
|
||||||
utxocache_changes_program = """
|
utxocache_changes_program = """
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Copyright (c) 2022 The Bitcoin Core developers
|
# Copyright (c) 2022-present The Bitcoin Core developers
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
@ -18,8 +18,10 @@ except ImportError:
|
||||||
|
|
||||||
from test_framework.address import ADDRESS_BCRT1_UNSPENDABLE
|
from test_framework.address import ADDRESS_BCRT1_UNSPENDABLE
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.util import assert_equal
|
from test_framework.util import (
|
||||||
|
assert_equal,
|
||||||
|
bpf_cflags,
|
||||||
|
)
|
||||||
|
|
||||||
validation_blockconnected_program = """
|
validation_blockconnected_program = """
|
||||||
#include <uapi/linux/ptrace.h>
|
#include <uapi/linux/ptrace.h>
|
||||||
|
|
|
@ -321,6 +321,13 @@ def wait_until_helper_internal(predicate, *, timeout=60, lock=None, timeout_fact
|
||||||
raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout))
|
raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout))
|
||||||
|
|
||||||
|
|
||||||
|
def bpf_cflags():
|
||||||
|
return [
|
||||||
|
"-Wno-error=implicit-function-declaration",
|
||||||
|
"-Wno-duplicate-decl-specifier", # https://github.com/bitcoin/bitcoin/issues/32322
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def sha256sum_file(filename):
|
def sha256sum_file(filename):
|
||||||
h = hashlib.sha256()
|
h = hashlib.sha256()
|
||||||
with open(filename, 'rb') as f:
|
with open(filename, 'rb') as f:
|
||||||
|
|
Loading…
Add table
Reference in a new issue