svn commit: r306640 - in head/sysutils/py-supervisor: . files
Ruslan Mahmatkhanov
rm at FreeBSD.org
Mon Oct 29 21:20:54 UTC 2012
Author: rm
Date: Mon Oct 29 21:20:53 2012
New Revision: 306640
URL: http://svn.freebsd.org/changeset/ports/306640
Log:
- update minimum required py-meld3 version
- use TEST_DEPENDS for tinderbox builds
- add OPTIONS for unit tests
- add regression-test target
- add the upstream patch to fix tests [1]
PR: 172851
Submitted by: Kubilay Kocak <koobs.freebsd at gmail dot com>
Approved by: Ildar Hizbulin <hizel at vyborg dot ru> (maintainer) [1]
Feature safe: yes
Added:
head/sysutils/py-supervisor/files/patch-supervisor-tests-test_childutils.py (contents, props changed)
Modified:
head/sysutils/py-supervisor/Makefile
Modified: head/sysutils/py-supervisor/Makefile
==============================================================================
--- head/sysutils/py-supervisor/Makefile Mon Oct 29 21:12:52 2012 (r306639)
+++ head/sysutils/py-supervisor/Makefile Mon Oct 29 21:20:53 2012 (r306640)
@@ -10,7 +10,19 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= hizel at vyborg.ru
COMMENT= System to monitor and control a number of processes on UNIX-like OS
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}meld3>=0.6.4:${PORTSDIR}/www/py-meld3
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}meld3>=0.6.5:${PORTSDIR}/www/py-meld3
+TEST_DEPENDS:= ${RUN_DEPENDS} \
+ ${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock
+
+OPTIONS_DEFINE= TESTS
+TESTS_DESC= Install mock for running unit tests
+OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MTESTS}
+BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock
+.endif
PORTDOCS= *.txt *.rst
@@ -37,4 +49,7 @@ post-install:
.endfor
.endif
+regression-test: build
+ @cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
+
.include <bsd.port.mk>
Added: head/sysutils/py-supervisor/files/patch-supervisor-tests-test_childutils.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/py-supervisor/files/patch-supervisor-tests-test_childutils.py Mon Oct 29 21:20:53 2012 (r306640)
@@ -0,0 +1,11 @@
+--- supervisor/tests/test_childutils.py
++++ supervisor/tests/test_childutils.py
+@@ -41,7 +41,7 @@ class ChildUtilsTests(unittest.TestCase):
+
+ def test_get_asctime(self):
+ from supervisor.childutils import get_asctime
+- timestamp = time.mktime((2009, 1, 18, 22, 14, 7, 0, 0, 0))
++ timestamp = time.mktime((2009, 1, 18, 22, 14, 7, 0, 0, -1))
+ result = get_asctime(timestamp)
+ self.assertEqual(result, '2009-01-18 22:14:07,000')
+
More information about the svn-ports-head
mailing list