D5569: tests: make HGCATAPULTSERVERPIPE imply HGTESTCATAPULTSERVERPIPE

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Fri Jan 11 03:29:30 UTC 2019


spectral created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I had attempted to do this before, but missed this case. This makes it so that
  one can do the following to get catapult traces that include both the .t test
  name (and non-hg commands run by that .t test) *and* the hg-internal tracing, in
  one trace:
  
    HGCATAPULTSERVERPIPE=/tmp/catapult.pipe run-tests.py <args>
  
  Without this change, we need to specify both `HG{,TEST}CATAPULTSERVERPIPE`; if
  we specify just the TEST one, we only get the .t tests (no hg-internals), which
  is working as intended. If we specify the non-TEST one, we only get the
  hg-internals (not the rest of the .t test), which was not intended.
  
  If you want to restore the previous behavior (just hg internals, not the stuff
  from the .t tests), run like:
  
    HGTESTCATAPULTSERVERPIPE=/dev/null \
      HGCATAPULTSERVERPIPE=/tmp/catapult.pipe \
      run-tests.py <args>

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1409,7 +1409,8 @@
         session = str(uuid.uuid4())
         if PYTHON3:
             session = session.encode('ascii')
-        hgcatapult = os.getenv('HGTESTCATAPULTSERVERPIPE')
+        hgcatapult = os.getenv('HGTESTCATAPULTSERVERPIPE') or \
+            os.getenv('HGCATAPULTSERVERPIPE')
         def toggletrace(cmd=None):
             if not hgcatapult or hgcatapult == os.devnull:
                 return



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


More information about the Mercurial-devel mailing list