blob: 34853c48845d5cdeccbdeb95ed922e7e65e20b8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
DISTUTILS_USE_PEP517=setuptools
inherit tmpfiles systemd distutils-r1
DESCRIPTION="The BGP swiss army knife of networking"
HOMEPAGE="https://github.com/Exa-Networks/exabgp"
SRC_URI="https://github.com/Exa-Networks/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
acct-group/exabgp
acct-user/exabgp
"
BDEPEND="
test? (
dev-python/psutil[${PYTHON_USEDEP}]
dev-python/pytest-asyncio[${PYTHON_USEDEP}]
dev-python/hypothesis[${PYTHON_USEDEP}]
dev-python/pytest-timeout[${PYTHON_USEDEP}]
)
"
PATCHES=(
"${FILESDIR}/exabgp-5.0.8-paths.patch"
"${FILESDIR}/exabgp-5.0.8-ip-path.patch"
"${FILESDIR}/exabgp-5.0.8-healthcheck-allow-disable-metric.patch"
"${FILESDIR}/exabgp-5.0.8-less-verbose-logging.patch"
)
EPYTEST_PLUGINS=(
hypothesis
pytest-asyncio
pytest-timeout
)
distutils_enable_tests pytest
python_prepare_all() {
# remove performance tests
rm -rf tests/performance || die
distutils-r1_python_prepare_all
}
python_install_all() {
distutils-r1_python_install_all
newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
newconfd "${FILESDIR}/${PN}.confd" ${PN}
newtmpfiles "${FILESDIR}/exabgp.tmpfiles" ${PN}.conf
systemd_dounit etc/systemd/*
insinto /etc/logrotate.d
newins "${FILESDIR}/${PN}.logrotate" ${PN}
keepdir /etc/exabgp
doman doc/man/*.?
}
python_test() {
local -a EPYTEST_DESELECT=(
# tests that need network access
tests/integration/test_connection_lifecycle.py::TestConnectionConcurrency::test_concurrent_read_write
tests/integration/test_connection_lifecycle.py::TestConnectionStateManagement::test_connection_cleanup_on_close
tests/integration/test_connection_lifecycle.py::TestConnectionStateManagement::test_multiple_close_calls
tests/integration/test_connection_lifecycle.py::TestOutgoingConnectionLifecycle::test_outgoing_connection_establishment
tests/integration/test_connection_lifecycle.py::TestOutgoingConnectionLifecycle::test_outgoing_full_message_exchange
tests/integration/test_connection_lifecycle.py::TestOutgoingConnectionLifecycle::test_outgoing_receive_keepalive
tests/integration/test_connection_lifecycle.py::TestOutgoingConnectionLifecycle::test_outgoing_send_keepalive
tests/integration/test_connection_lifecycle.py::TestConnectionStateManagement::test_file_descriptor_tracking
# unreliable test
tests/fuzz/test_update_split.py::test_update_split_withdrawn_length_fuzzing
)
epytest
}
pkg_postinst() {
tmpfiles_process ${PN}.conf
}
|