tests: add "have" check for dpkg builddeps
authorKyle Lippincott <spectral@google.com>
Sun, 01 Oct 2017 05:21:32 -0700
changeset 34401 13d3f8aaed87
parent 34400 3d936da4f97b
child 34402 689f6cdccef5
tests: add "have" check for dpkg builddeps Differential Revision: https://phab.mercurial-scm.org/D879
tests/hghave.py
tests/test-debian-packages.t
--- a/tests/hghave.py	Sun Oct 01 04:37:56 2017 -0700
+++ b/tests/hghave.py	Sun Oct 01 05:21:32 2017 -0700
@@ -587,6 +587,13 @@
                           br'to run debian/rules with given parameter')
     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")
 def has_demandimport():
     return os.environ.get('HGDEMANDIMPORT') != 'disable'
--- a/tests/test-debian-packages.t	Sun Oct 01 04:37:56 2017 -0700
+++ b/tests/test-debian-packages.t	Sun Oct 01 05:21:32 2017 -0700
@@ -1,4 +1,4 @@
-#require test-repo slow debhelper
+#require test-repo slow debhelper debdeps
 
   $ . "$TESTDIR/helpers-testrepo.sh"
   $ testrepohgenv