Skip to content

Commit

Permalink
net-analyzer/wapiti: skip tests in installation
Browse files Browse the repository at this point in the history
Also restrict tests for now, new ones require php webserver local
execution

Closes: https://bugs.gentoo.org/774300
Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Bernard Cafarelli <[email protected]>
  • Loading branch information
voyageur committed Mar 5, 2021
1 parent cb159de commit b1f8a27
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 8 additions & 1 deletion net-analyzer/wapiti/wapiti-3.0.4.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,16 @@ RDEPEND="dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
kerberos? ( dev-python/requests-kerberos[${PYTHON_USEDEP}] )
ntlm? ( dev-python/requests-ntlm[${PYTHON_USEDEP}] )"

distutils_enable_tests --install pytest
BDEPEND+=" test? ( dev-python/responses[${PYTHON_USEDEP}] )"
# Many tests require execution of local test php server
RESTRICT="test"

S=${WORKDIR}/${MY_P}

python_prepare_all() {
sed -e 's/"pytest-runner"//' -i setup.py || die
sed -e 's/"pytest-runner"//' \
-e "/find_packages/s/()/(exclude=['tests*'])/" \
-i setup.py || die
distutils-r1_python_prepare_all
}
8 changes: 6 additions & 2 deletions net-analyzer/wapiti/wapiti-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ RDEPEND="dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
kerberos? ( dev-python/requests-kerberos[${PYTHON_USEDEP}] )
ntlm? ( dev-python/requests-ntlm[${PYTHON_USEDEP}] )"

distutils_enable_tests pytest
distutils_enable_tests --install pytest
BDEPEND+=" test? ( dev-python/responses[${PYTHON_USEDEP}] )"
# Many tests require execution of local test php server
RESTRICT="test"

python_prepare_all() {
sed -e 's/"pytest-runner"//' -i setup.py || die
sed -e 's/"pytest-runner"//' \
-e "/find_packages/s/()/(exclude=['tests*'])/" \
-i setup.py || die
distutils-r1_python_prepare_all
}

0 comments on commit b1f8a27

Please sign in to comment.