tests/run-tests.py
changeset 32703 9d1d3199382e
parent 32702 d0b9c36851f5
child 32704 1270b00a385d
--- a/tests/run-tests.py	Tue Jun 06 13:52:25 2017 -0700
+++ b/tests/run-tests.py	Tue Jun 06 13:56:53 2017 -0700
@@ -2346,15 +2346,6 @@
             return self._gettest(desc, i)
 
         try:
-            if self._installdir:
-                self._installhg()
-                self._checkhglib("Testing")
-            else:
-                self._usecorrectpython()
-            if self.options.chg:
-                assert self._installdir
-                self._installchg()
-
             if self.options.restart:
                 orig = list(testdescs)
                 while testdescs:
@@ -2392,6 +2383,16 @@
             if self.options.verbose:
                 verbosity = 2
             runner = TextTestRunner(self, verbosity=verbosity)
+
+            if self._installdir:
+                self._installhg()
+                self._checkhglib("Testing")
+            else:
+                self._usecorrectpython()
+            if self.options.chg:
+                assert self._installdir
+                self._installchg()
+
             result = runner.run(suite)
 
             if result.failures: