Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG13d3f8aaed87: tests: add "have" check for dpkg builddeps
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
dh_py2 = matchoutput('dh_python2 --help', | dh_py2 = matchoutput('dh_python2 --help', | ||||
br'other supported Python versions') | br'other supported Python versions') | ||||
# debuild comes from the 'devscripts' package, though you might want | # debuild comes from the 'devscripts' package, though you might want | ||||
# the 'build-debs' package instead, which has a dependency on devscripts. | # the 'build-debs' package instead, which has a dependency on devscripts. | ||||
debuild = matchoutput('debuild --help', | debuild = matchoutput('debuild --help', | ||||
br'to run debian/rules with given parameter') | br'to run debian/rules with given parameter') | ||||
return dpkg and dh and dh_py2 and debuild | return dpkg and dh and dh_py2 and debuild | ||||
@check("debdeps", | |||||
"debian build dependencies (run dpkg-checkbuilddeps in contrib/)") | |||||
def has_debdeps(): | |||||
# just check exit status (ignoring output) | |||||
path = '%s/../contrib/debian/control' % os.environ['TESTDIR'] | |||||
return matchoutput('dpkg-checkbuilddeps %s' % path, br'') | |||||
@check("demandimport", "demandimport enabled") | @check("demandimport", "demandimport enabled") | ||||
def has_demandimport(): | def has_demandimport(): | ||||
return os.environ.get('HGDEMANDIMPORT') != 'disable' | return os.environ.get('HGDEMANDIMPORT') != 'disable' | ||||
@check("py3k", "running with Python 3.x") | @check("py3k", "running with Python 3.x") | ||||
def has_py3k(): | def has_py3k(): | ||||
return 3 == sys.version_info[0] | return 3 == sys.version_info[0] | ||||
#require test-repo slow debhelper | #require test-repo slow debhelper debdeps | ||||
$ . "$TESTDIR/helpers-testrepo.sh" | $ . "$TESTDIR/helpers-testrepo.sh" | ||||
$ testrepohgenv | $ testrepohgenv | ||||
Ensure debuild doesn't run the testsuite, as that could get silly. | Ensure debuild doesn't run the testsuite, as that could get silly. | ||||
$ DEB_BUILD_OPTIONS=nocheck | $ DEB_BUILD_OPTIONS=nocheck | ||||
$ export DEB_BUILD_OPTIONS | $ export DEB_BUILD_OPTIONS | ||||
$ OUTPUTDIR=`pwd` | $ OUTPUTDIR=`pwd` |