tests/run-tests.py
changeset 44615 78a8f65eacc8
parent 44577 f8427841c8fc
child 44632 82543879b48e
--- a/tests/run-tests.py	Tue Mar 24 12:48:57 2020 +0530
+++ b/tests/run-tests.py	Wed Mar 25 13:20:08 2020 +0530
@@ -531,6 +531,9 @@
         action="store_true",
         help="install and use chg wrapper in place of hg",
     )
+    hgconf.add_argument(
+        "--chg-debug", action="store_true", help="show chg debug logs",
+    )
     hgconf.add_argument("--compiler", help="compiler to build with")
     hgconf.add_argument(
         '--extra-config-opt',
@@ -924,6 +927,7 @@
         hgcommand=None,
         slowtimeout=None,
         usechg=False,
+        chgdebug=False,
         useipv6=False,
     ):
         """Create a test from parameters.
@@ -979,6 +983,7 @@
         self._shell = _sys2bytes(shell)
         self._hgcommand = hgcommand or b'hg'
         self._usechg = usechg
+        self._chgdebug = chgdebug
         self._useipv6 = useipv6
 
         self._aborted = False
@@ -1417,6 +1422,8 @@
 
         if self._usechg:
             env['CHGSOCKNAME'] = os.path.join(self._chgsockdir, b'server')
+        if self._chgdebug:
+            env['CHGDEBUG'] = 'true'
 
         return env
 
@@ -3386,6 +3393,7 @@
             shell=self.options.shell,
             hgcommand=self._hgcommand,
             usechg=bool(self.options.with_chg or self.options.chg),
+            chgdebug=self.options.chg_debug,
             useipv6=useipv6,
             **kwds
         )