1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00

- 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
This commit is contained in:
Ruslan Makhmatkhanov 2012-10-29 21:20:53 +00:00
parent 58c2a61181
commit 18e6b74dc7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=306640
2 changed files with 27 additions and 1 deletions

View File

@ -10,7 +10,19 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= hizel@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>

View File

@ -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')