diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-09-08 16:25:34 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-09-08 16:26:38 +0200 |
commit | 020bc5f388efdef50ce2a5d47fce1e2d96df8c2a (patch) | |
tree | 067788aa7bc69c81333dcc1c5d71685fdba574b2 /dev-embedded/nodemcu-uploader | |
parent | dev-embedded/nodemcu-uploader: Remove old (diff) | |
download | gentoo-020bc5f388efdef50ce2a5d47fce1e2d96df8c2a.tar.gz gentoo-020bc5f388efdef50ce2a5d47fce1e2d96df8c2a.tar.bz2 gentoo-020bc5f388efdef50ce2a5d47fce1e2d96df8c2a.zip |
dev-embedded/nodemcu-uploader: Use unittest to run tests
Closes: https://bugs.gentoo.org/927517
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-embedded/nodemcu-uploader')
-rw-r--r-- | dev-embedded/nodemcu-uploader/nodemcu-uploader-1.0.0-r1.ebuild | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/dev-embedded/nodemcu-uploader/nodemcu-uploader-1.0.0-r1.ebuild b/dev-embedded/nodemcu-uploader/nodemcu-uploader-1.0.0-r1.ebuild index bf82f1c4fcba..80a603e45d10 100644 --- a/dev-embedded/nodemcu-uploader/nodemcu-uploader-1.0.0-r1.ebuild +++ b/dev-embedded/nodemcu-uploader/nodemcu-uploader-1.0.0-r1.ebuild @@ -14,10 +14,17 @@ SRC_URI="https://github.com/kmpm/nodemcu-uploader/archive/v${PV}.tar.gz -> ${P}. LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~x86" - -RDEPEND=">=dev-python/pyserial-3.4[${PYTHON_USEDEP}]" - -distutils_enable_tests setup.py +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-python/pyserial-3.4[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + ${RDEPEND} + ) +" src_prepare() { # https://bugs.gentoo.org/796422 @@ -25,3 +32,8 @@ src_prepare() { distutils-r1_src_prepare } + +python_test() { + "${EPYTHON}" -m unittest -v tests.get_tests || + die "Tests failed on ${EPYTHON}" +} |