diff options
author | Kai Knoblich <kai@FreeBSD.org> | 2019-08-04 21:34:56 +0000 |
---|---|---|
committer | Kai Knoblich <kai@FreeBSD.org> | 2019-08-04 21:34:56 +0000 |
commit | 2a336d98c006357976441469760092f32d7b19ba (patch) | |
tree | d7426db0af490be2468466c9a0dfb1e2f865f98c | |
parent | www/mitmproxy: Prepare for py-openssl 19.0.0 and unbreak at runtime (diff) |
[NEW PORT] devel/py-flaky
Plugin for nose or pytest that automatically reruns flaky tests
Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
on components that aren't 100% reliable.
With flaky, instead of removing those tests or marking them to skip, they
can be automatically retried.
WWW: https://github.com/box/flaky
Reviewed by: koobs
Approved by: koobs
Differential Revision: https://reviews.freebsd.org/D21132
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/py-flaky/Makefile | 39 | ||||
-rw-r--r-- | devel/py-flaky/distinfo | 3 | ||||
-rw-r--r-- | devel/py-flaky/pkg-descr | 7 |
4 files changed, 50 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 6c8762be1e68..63a47ab15559 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4408,6 +4408,7 @@ SUBDIR += py-flake8-import-order SUBDIR += py-flake8-polyfill SUBDIR += py-flake8-quotes + SUBDIR += py-flaky SUBDIR += py-flask-babel SUBDIR += py-flatbuffers SUBDIR += py-flex diff --git a/devel/py-flaky/Makefile b/devel/py-flaky/Makefile new file mode 100644 index 000000000000..91d3b7839f2d --- /dev/null +++ b/devel/py-flaky/Makefile @@ -0,0 +1,39 @@ +# $FreeBSD$ + +PORTNAME= flaky +DISTVERSION= 3.6.0 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= kai@FreeBSD.org +COMMENT= Plugin for nose or pytest that automatically reruns flaky tests + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}genty>0:devel/py-genty@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} + +USES= python +USE_PYTHON= distutils autoplist + +NO_ARCH= yes + +do-test: + cd ${WRKSRC} && \ + ${PYTHON_CMD} -m nose -v --no-flaky-report \ + --with-flaky --exclude="test_nose_options_example" test/test_nose/ && \ + ${PYTHON_CMD} -m pytest -v -rs --no-flaky-report \ + -k 'example and not options' -n 1 test/test_pytest && \ + ${PYTHON_CMD} -m pytest -v -rs \ + -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py && \ + ${PYTHON_CMD} -m nose -v --no-flaky-report \ + --with-flaky --force-flaky --max-runs 2 test/test_nose/test_nose_options_example.py && \ + ${PYTHON_CMD} -m pytest -v -rs --no-flaky-report \ + --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py + +.include <bsd.port.mk> diff --git a/devel/py-flaky/distinfo b/devel/py-flaky/distinfo new file mode 100644 index 000000000000..8c7163e1aad3 --- /dev/null +++ b/devel/py-flaky/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1563397978 +SHA256 (flaky-3.6.0.tar.gz) = c24e321b3b4b4a2d323b646acff6738e7601849832f4280864d69f00a6a9869d +SIZE (flaky-3.6.0.tar.gz) = 29523 diff --git a/devel/py-flaky/pkg-descr b/devel/py-flaky/pkg-descr new file mode 100644 index 000000000000..15d19350f3a7 --- /dev/null +++ b/devel/py-flaky/pkg-descr @@ -0,0 +1,7 @@ +Ideally, tests reliably pass or fail, but sometimes test fixtures must rely on +components that aren't 100% reliable. + +With flaky, instead of removing those tests or marking them to skip, they can +be automatically retried. + +WWW: https://github.com/box/flaky |