Patchwork D9295: test-filecache: use sys.executable to call python

login
register
mail settings
Submitter phabricator
Date Nov. 11, 2020, 9:03 p.m.
Message ID <differential-rev-PHID-DREV-n6pkqufj43dufwo2sdk4-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47570/
State Superseded
Headers show

Comments

phabricator - Nov. 11, 2020, 9:03 p.m.
Mathiasdm created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  As was mentioned in c102b704edb5 <https://phab.mercurial-scm.org/rHGc102b704edb5191ed15ed4b02b625a888b8be816>, test scripts calling 'python' or 'python3'
  might use the wrong python.
  For test-filecache.py, this causes a failed test on CentOS 7.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-filecache.py

CHANGE DETAILS




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

Patch

diff --git a/tests/test-filecache.py b/tests/test-filecache.py
--- a/tests/test-filecache.py
+++ b/tests/test-filecache.py
@@ -5,7 +5,7 @@ 
 import sys
 
 if subprocess.call(
-    ['python', '%s/hghave' % os.environ['TESTDIR'], 'cacheable']
+    [sys.executable, '%s/hghave' % os.environ['TESTDIR'], 'cacheable']
 ):
     sys.exit(80)