summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Whitlock <gentoo@mattwhitlock.name>2023-10-24 12:00:31 -0400
committerFlorian Schmaus <flow@gentoo.org>2023-10-25 10:37:20 +0200
commitce3df200dcf0857155b695bc917825d4edea840c (patch)
treec7e6cbb02f42ee3127e659fffc7639238ea75188 /net-p2p/bitcoin-core
parentnet-p2p/bitcoin-core: install rpcauth.py to doc dir (diff)
downloadgentoo-ce3df200dcf0857155b695bc917825d4edea840c.tar.gz
gentoo-ce3df200dcf0857155b695bc917825d4edea840c.tar.bz2
gentoo-ce3df200dcf0857155b695bc917825d4edea840c.zip
net-p2p/bitcoin-core: run functional tests if USE="daemon"
Add --without-seccomp since the sandbox is broken and has been dropped upstream in 26.0 anyway. Pass --timeout-factor (default: 15) to test/functional/test_runner.py since our system may not be as quick as the machines upstream tests on, especially if we happen to be building multiple packages in parallel. Set TIMEOUT_FACTOR in package env to override. Signed-off-by: Matt Whitlock <gentoo@mattwhitlock.name> Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'net-p2p/bitcoin-core')
-rw-r--r--net-p2p/bitcoin-core/bitcoin-core-25.1-r1.ebuild21
1 files changed, 19 insertions, 2 deletions
diff --git a/net-p2p/bitcoin-core/bitcoin-core-25.1-r1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-25.1-r1.ebuild
index 5eadbf6fddce..4d55cae08417 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-25.1-r1.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-25.1-r1.ebuild
@@ -5,7 +5,7 @@ EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit autotools bash-completion-r1 db-use desktop python-any-r1 systemd xdg-utils
+inherit autotools bash-completion-r1 check-reqs db-use desktop edo multiprocessing python-any-r1 systemd xdg-utils
DESCRIPTION="Reference implementation of the Bitcoin cryptocurrency"
HOMEPAGE="https://bitcoincore.org/"
@@ -123,10 +123,17 @@ pkg_pretend() {
configuration, but your Bitcoin node will be unable to open any wallets.
EOF
fi
+
+ # test/functional/feature_pruning.py requires 4 GB disk space
+ # test/functional/wallet_pruning.py requires 1.3 GB disk space
+ use test && CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_pretend
}
pkg_setup() {
- use test && python-any-r1_pkg_setup
+ if use test ; then
+ CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_setup
+ python-any-r1_pkg_setup
+ fi
}
src_prepare() {
@@ -174,6 +181,9 @@ src_configure() {
--enable-util-tx
--${wallet}-util-wallet
--disable-util-util
+ # syscall sandbox is missing faccessat2 and pselect6, causing bitcoind to crash during tests;
+ # removed upstream for 26.0 in https://github.com/bitcoin/bitcoin/commit/32e2ffc39374f61bb2435da507f285459985df9e
+ --without-seccomp
$(use_with libs)
$(use_with daemon)
$(use_with gui gui qt5)
@@ -184,6 +194,13 @@ src_configure() {
econf "${myeconfargs[@]}"
}
+src_test() {
+ emake check
+
+ use daemon && edo "${PYTHON}" test/functional/test_runner.py \
+ --ansi --extended --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}"
+}
+
src_install() {
use external-signer && DOCS+=( doc/external-signer.md )
use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md )