comparison tests/run-tests.py @ 39742:38d51371792b

run-tests: partially backout PYTHON quoting In 7f8b7a060584, I quoted this to support python being installed to "Program Files". Even though the string passed to os.popen() is this: "c:/Python27/python.exe" -c "import mercurial; print (mercurial.__path__[0])" ... cmd.exe is trying to run this: 'c:/Python27/python.exe" -c "import' This caused test-hghave.t to fail, reporting 'unexpected mercurial lib: ""', because the failed execution prints nothing to stdout. Py3 fails as though it's not quoted. For whatever reason, print() shows up in the output when run with py2, but not py3, so I'm having a hard time debugging this. For now, let's fix the buildbot.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 20 Sep 2018 23:45:30 -0400
parents ac32685011a3
children 0f8ff3ff5d5c
comparison
equal deleted inserted replaced
39741:7303ab86431a 39742:38d51371792b
3080 """Return the path to the mercurial package that is actually found by 3080 """Return the path to the mercurial package that is actually found by
3081 the current Python interpreter.""" 3081 the current Python interpreter."""
3082 if self._hgpath is not None: 3082 if self._hgpath is not None:
3083 return self._hgpath 3083 return self._hgpath
3084 3084
3085 cmd = b'"%s" -c "import mercurial; print (mercurial.__path__[0])"' 3085 cmd = b'%s -c "import mercurial; print (mercurial.__path__[0])"'
3086 cmd = cmd % PYTHON 3086 cmd = cmd % PYTHON
3087 if PYTHON3: 3087 if PYTHON3:
3088 cmd = _strpath(cmd) 3088 cmd = _strpath(cmd)
3089 pipe = os.popen(cmd) 3089 pipe = os.popen(cmd)
3090 try: 3090 try: