pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel This is a plugin which will terminate tests afte...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3d2700fc00f8
branches:  trunk
changeset: 370562:3d2700fc00f8
user:      adam <adam%pkgsrc.org@localhost>
date:      Thu Oct 19 06:51:11 2017 +0000

description:
This is a plugin which will terminate tests after a certain timeout. When doing
so it will show a stack dump of all threads running at the time. This is useful
when running tests under a continuous integration server or simply if you don't
know why the test suite hangs.

Note that while by default on POSIX systems py.test will continue to execute
the tests after a test has timed, out this is not always possible. Often the
only sure way to interrupt a hanging test is by terminating the entire process.
As this is a hard termination (os._exit()) it will result in no teardown, JUnit
XML output etc. But the plugin will ensure you will have the debugging output
on stderr nevertheless, which is the most important part at this stage.

diffstat:

 devel/Makefile                 |   3 ++-
 devel/py-test-timeout/DESCR    |  11 +++++++++++
 devel/py-test-timeout/Makefile |  24 ++++++++++++++++++++++++
 devel/py-test-timeout/PLIST    |  10 ++++++++++
 devel/py-test-timeout/distinfo |   6 ++++++
 5 files changed, 53 insertions(+), 1 deletions(-)

diffs (84 lines):

diff -r 53cbd37beef2 -r 3d2700fc00f8 devel/Makefile
--- a/devel/Makefile    Thu Oct 19 06:47:26 2017 +0000
+++ b/devel/Makefile    Thu Oct 19 06:51:11 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2555 2017/10/17 18:44:14 adam Exp $
+# $NetBSD: Makefile,v 1.2556 2017/10/19 06:51:11 adam Exp $
 #
 
 COMMENT=       Development utilities
@@ -2122,6 +2122,7 @@
 SUBDIR+=       py-test-localserver
 SUBDIR+=       py-test-mock
 SUBDIR+=       py-test-runner
+SUBDIR+=       py-test-timeout
 SUBDIR+=       py-test-utils
 SUBDIR+=       py-test-xdist
 SUBDIR+=       py-testpath
diff -r 53cbd37beef2 -r 3d2700fc00f8 devel/py-test-timeout/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-test-timeout/DESCR       Thu Oct 19 06:51:11 2017 +0000
@@ -0,0 +1,11 @@
+This is a plugin which will terminate tests after a certain timeout. When doing
+so it will show a stack dump of all threads running at the time. This is useful
+when running tests under a continuous integration server or simply if you don't
+know why the test suite hangs.
+
+Note that while by default on POSIX systems py.test will continue to execute
+the tests after a test has timed, out this is not always possible. Often the
+only sure way to interrupt a hanging test is by terminating the entire process.
+As this is a hard termination (os._exit()) it will result in no teardown, JUnit
+XML output etc. But the plugin will ensure you will have the debugging output
+on stderr nevertheless, which is the most important part at this stage.
diff -r 53cbd37beef2 -r 3d2700fc00f8 devel/py-test-timeout/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-test-timeout/Makefile    Thu Oct 19 06:51:11 2017 +0000
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1 2017/10/19 06:52:03 adam Exp $
+
+DISTNAME=      pytest-timeout-1.2.0
+PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/py//}
+CATEGORIES=    devel python
+MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pytest-timeout/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://bitbucket.org/pytest-dev/pytest-timeout/
+COMMENT=       Py.test plugin to abort hanging tests
+LICENSE=       mit
+
+DEPENDS+=      ${PYPKGPREFIX}-test>=2.8.0:../../devel/py-test
+
+USE_LANGUAGES= # none
+
+#post-install:
+#      cd ${DESTDIR}${PREFIX}/bin && \
+#              ${MV} py.test py.test-${PYVERSSUFFIX} && \
+#              ${MV} pytest pytest-${PYVERSSUFFIX} || ${TRUE}
+
+.include "../../lang/python/application.mk"
+.include "../../lang/python/egg.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 53cbd37beef2 -r 3d2700fc00f8 devel/py-test-timeout/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-test-timeout/PLIST       Thu Oct 19 06:51:11 2017 +0000
@@ -0,0 +1,10 @@
+@comment $NetBSD: PLIST,v 1.1 2017/10/19 06:52:03 adam Exp $
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
+${PYSITELIB}/${EGG_INFODIR}/requires.txt
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/pytest_timeout.py
+${PYSITELIB}/pytest_timeout.pyc
+${PYSITELIB}/pytest_timeout.pyo
diff -r 53cbd37beef2 -r 3d2700fc00f8 devel/py-test-timeout/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-test-timeout/distinfo    Thu Oct 19 06:51:11 2017 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2017/10/19 06:52:03 adam Exp $
+
+SHA1 (pytest-timeout-1.2.0.tar.gz) = 6895457de75f39992af318693136fd05d2c825f7
+RMD160 (pytest-timeout-1.2.0.tar.gz) = 3e0674c33446d700105f90fc1c7afcf252bfe932
+SHA512 (pytest-timeout-1.2.0.tar.gz) = b86548843e9ff8c8f7d1c39735025cdfa98befe2860e2a8a5d422d08bd7f542032384f147125a2a2841268154cc3a3874ef0aa4765d454fd5390edb773b106ae
+Size (pytest-timeout-1.2.0.tar.gz) = 13258 bytes



Home | Main Index | Thread Index | Old Index