Patchwork D879: tests: add "have" check for dpkg builddeps

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2017, 1:33 p.m.
Message ID <897462d368a7582b65984635a6f6508a@localhost.localdomain>
Download mbox | patch
Permalink /patch/24346/
State Not Applicable
Headers show

Comments

phabricator - Oct. 1, 2017, 1:33 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG13d3f8aaed87: tests: add &quot;have&quot; check for dpkg builddeps (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D879?vs=2265&id=2283

REVISION DETAIL
  https://phab.mercurial-scm.org/D879

AFFECTED FILES
  tests/hghave.py
  tests/test-debian-packages.t

CHANGE DETAILS




To: spectral, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-debian-packages.t b/tests/test-debian-packages.t
--- a/tests/test-debian-packages.t
+++ b/tests/test-debian-packages.t
@@ -1,4 +1,4 @@ 
-#require test-repo slow debhelper
+#require test-repo slow debhelper debdeps
 
   $ . "$TESTDIR/helpers-testrepo.sh"
   $ testrepohgenv
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -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'