summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@gentoo.org>2024-07-02 17:46:23 +0200
committerPetr Vaněk <arkamar@gentoo.org>2024-07-03 15:52:57 +0200
commita3939ba31fa602295d6aee83ef8e664743b598ab (patch)
tree7c437d1f475a6ddf003a0850946a8e4f2564d7c4 /app-backup
parentapp-backup/borgbackup: reformat deps (diff)
downloadgentoo-a3939ba31fa602295d6aee83ef8e664743b598ab.tar.gz
gentoo-a3939ba31fa602295d6aee83ef8e664743b598ab.tar.bz2
gentoo-a3939ba31fa602295d6aee83ef8e664743b598ab.zip
app-backup/borgbackup: wire up tests
pytest parameter is based on suggestion from development manual [1]. [1] https://github.com/borgbackup/borg/blob/aada9859ff025d15010ab71352958d4639147fd7/docs/development.rst#running-the-tests-using-the-pypi-package Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Diffstat (limited to 'app-backup')
-rw-r--r--app-backup/borgbackup/borgbackup-1.2.8.ebuild29
1 files changed, 24 insertions, 5 deletions
diff --git a/app-backup/borgbackup/borgbackup-1.2.8.ebuild b/app-backup/borgbackup/borgbackup-1.2.8.ebuild
index 859d227f53c9..3026af1e55e4 100644
--- a/app-backup/borgbackup/borgbackup-1.2.8.ebuild
+++ b/app-backup/borgbackup/borgbackup-1.2.8.ebuild
@@ -16,11 +16,6 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv x86"
-# "import file mismatch" when in S, "attempted relative import with no
-# known parent package" when in BUILD_DIR/install/.../borg/testsuite.
-# Needs work.
-RESTRICT="test"
-
DEPEND="
app-arch/lz4
app-arch/zstd
@@ -41,10 +36,34 @@ BDEPEND="
dev-python/cython[${PYTHON_USEDEP}]
dev-python/pkgconfig[${PYTHON_USEDEP}]
dev-python/setuptools-scm[${PYTHON_USEDEP}]
+ test? (
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ )
"
+EPYTEST_XDIST=1
distutils_enable_tests pytest
+python_test() {
+ local EPYTEST_DESELECT=(
+ # Needs pytest-benchmark fixture
+ benchmark.py::test_
+
+ # TODO:
+ # Following tests fail because of additional warning in the output:
+ # ResourceWarning: unclosed file <_io.BufferedReader name=14>
+ # which is not expected in asserts
+ archiver.py::ArchiverTestCase::test_create_content_from_command_with_failed_command
+ archiver.py::ArchiverTestCase::test_create_paths_from_command_with_failed_command
+ archiver.py::RemoteArchiverTestCase::test_create_content_from_command_with_failed_command
+ archiver.py::RemoteArchiverTestCase::test_create_paths_from_command_with_failed_command
+ )
+
+ # This disables fuse releated tests
+ local -x BORG_FUSE_IMPL="none"
+ epytest --pyargs borg.testsuite
+}
+
src_install() {
distutils-r1_src_install
doman docs/man/*