setuptools / dpkg-buildpackage:如果nosetests失败则拒绝构建
我有一个非常简单的 python 包,我使用 setuptools、cdbs 和 pycentral 将其构建到 debian 包中:
setup.py:
from setuptools import setup
setup(name='PHPSerialize',
version='1.0',
py_modules=['PHPSerialize'],
test_suite = 'nose.collector'
)
debian/rules:
#!/usr/bin/make -f
DEB_PYTHON_SYSTEM = pycentral
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
现在,有没有一种简单的方法可以使 dpkg-buildpackage 执行单元测试并拒绝创建 . deb 如果测试套件失败?
I have a very simple python package that I build into debian packages using setuptools, cdbs and pycentral:
setup.py:
from setuptools import setup
setup(name='PHPSerialize',
version='1.0',
py_modules=['PHPSerialize'],
test_suite = 'nose.collector'
)
debian/rules:
#!/usr/bin/make -f
DEB_PYTHON_SYSTEM = pycentral
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
Now, is there an easy way to make dpkg-buildpackage execute the unit tests and refuse to create the .deb if the test suite fails?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
Try