Patchwork D11047: run-tests: setup "correct" python earlier

login
register
mail settings
Submitter phabricator
Date July 10, 2021, 12:38 a.m.
Message ID <differential-rev-PHID-DREV-e5dd73e7xtx4ifgpr76b-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49360/
State Superseded
Headers show

Comments

phabricator - July 10, 2021, 12:38 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I don't see any good reason to wait and this makes the setup simpler.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -3432,11 +3432,10 @@ 
             if self.options.list_tests:
                 result = runner.listtests(suite)
             else:
+                self._usecorrectpython()
                 if self._installdir:
                     self._installhg()
                     self._checkhglib("Testing")
-                else:
-                    self._usecorrectpython()
                 if self.options.chg:
                     assert self._installdir
                     self._installchg()
@@ -3718,8 +3717,6 @@ 
             sys.exit(1)
         os.chdir(self._testdir)
 
-        self._usecorrectpython()
-
         hgbat = os.path.join(self._bindir, b'hg.bat')
         if os.path.isfile(hgbat):
             # hg.bat expects to be put in bin/scripts while run-tests.py