##// END OF EJS Templates
py3: teach run-tests.py to handle exe with spaces when --local isn't specified...
Matt Harbison -
r40966:fcdff048 default
parent child Browse files
Show More
@@ -3019,7 +3019,7 class TestRunner(object):
3019 # least on Windows for now, deal with .pydistutils.cfg bugs
3019 # least on Windows for now, deal with .pydistutils.cfg bugs
3020 # when they happen.
3020 # when they happen.
3021 nohome = b''
3021 nohome = b''
3022 cmd = (b'%(exe)s setup.py %(pure)s clean --all'
3022 cmd = (b'"%(exe)s" setup.py %(pure)s clean --all'
3023 b' build %(compiler)s --build-base="%(base)s"'
3023 b' build %(compiler)s --build-base="%(base)s"'
3024 b' install --force --prefix="%(prefix)s"'
3024 b' install --force --prefix="%(prefix)s"'
3025 b' --install-lib="%(libdir)s"'
3025 b' --install-lib="%(libdir)s"'
@@ -3042,7 +3042,7 class TestRunner(object):
3042 makedirs(self._bindir)
3042 makedirs(self._bindir)
3043
3043
3044 vlog("# Running", cmd)
3044 vlog("# Running", cmd)
3045 if os.system(_strpath(cmd)) == 0:
3045 if subprocess.call(_strpath(cmd), shell=True) == 0:
3046 if not self.options.verbose:
3046 if not self.options.verbose:
3047 try:
3047 try:
3048 os.remove(installerrs)
3048 os.remove(installerrs)
@@ -3121,15 +3121,15 class TestRunner(object):
3121 if self._hgpath is not None:
3121 if self._hgpath is not None:
3122 return self._hgpath
3122 return self._hgpath
3123
3123
3124 cmd = b'%s -c "import mercurial; print (mercurial.__path__[0])"'
3124 cmd = b'"%s" -c "import mercurial; print (mercurial.__path__[0])"'
3125 cmd = cmd % PYTHON
3125 cmd = cmd % PYTHON
3126 if PYTHON3:
3126 if PYTHON3:
3127 cmd = _strpath(cmd)
3127 cmd = _strpath(cmd)
3128 pipe = os.popen(cmd)
3128
3129 try:
3129 p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
3130 self._hgpath = _bytespath(pipe.read().strip())
3130 out, err = p.communicate()
3131 finally:
3131
3132 pipe.close()
3132 self._hgpath = out.strip()
3133
3133
3134 return self._hgpath
3134 return self._hgpath
3135
3135
General Comments 0
You need to be logged in to leave comments. Login now