Patchwork D3425: tests: mark test-check-interfaces.py as requiring a repo

login
register
mail settings
Submitter phabricator
Date April 24, 2018, 3:21 p.m.
Message ID <differential-rev-PHID-DREV-6efhvyotikkvihtrljgz-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/31220/
State Superseded
Headers show

Comments

phabricator - April 24, 2018, 3:21 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This was failing our 4.6rc1 build like this:
  
    mercurial.error.RepoError: repository /tmp/build-debs.zMTRhC/src-4.6rc1 not found

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-check-interfaces.py

CHANGE DETAILS




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

Patch

diff --git a/tests/test-check-interfaces.py b/tests/test-check-interfaces.py
--- a/tests/test-check-interfaces.py
+++ b/tests/test-check-interfaces.py
@@ -6,6 +6,13 @@ 
 encoding.environ[b'HGREALINTERFACES'] = b'1'
 
 import os
+import subprocess
+import sys
+
+# Only run if tests are run in a repo
+if subprocess.call(['python', '%s/hghave' % os.environ['TESTDIR'],
+                    'test-repo']):
+    sys.exit(80)
 
 from mercurial.thirdparty.zope import (
     interface as zi,