##// END OF EJS Templates
py3: decode bytes before logging in run-tests.py...
Denis Laxalde -
r43614:b4b11311 stable
parent child Browse files
Show More
@@ -1504,7 +1504,7 class PythonTest(Test):
1504 1504 py3switch = self._py3warnings and b' -3' or b''
1505 1505 # Quote the python(3) executable for Windows
1506 1506 cmd = b'"%s"%s "%s"' % (PYTHON, py3switch, self.path)
1507 vlog("# Running", cmd)
1507 vlog("# Running", cmd.decode("utf-8"))
1508 1508 normalizenewlines = os.name == 'nt'
1509 1509 result = self._runcommand(cmd, env, normalizenewlines=normalizenewlines)
1510 1510 if self._aborted:
@@ -1589,7 +1589,7 class TTest(Test):
1589 1589 f.write(l)
1590 1590
1591 1591 cmd = b'%s "%s"' % (self._shell, fname)
1592 vlog("# Running", cmd)
1592 vlog("# Running", cmd.decode("utf-8"))
1593 1593
1594 1594 exitcode, output = self._runcommand(cmd, env)
1595 1595
@@ -3111,12 +3111,16 class TestRunner(object):
3111 3111 'extensions.logexceptions=%s' % logexceptions.decode('utf-8')
3112 3112 )
3113 3113
3114 vlog("# Using TESTDIR", self._testdir)
3115 vlog("# Using RUNTESTDIR", osenvironb[b'RUNTESTDIR'])
3116 vlog("# Using HGTMP", self._hgtmp)
3114 vlog("# Using TESTDIR", _strpath(self._testdir))
3115 vlog("# Using RUNTESTDIR", _strpath(osenvironb[b'RUNTESTDIR']))
3116 vlog("# Using HGTMP", _strpath(self._hgtmp))
3117 3117 vlog("# Using PATH", os.environ["PATH"])
3118 vlog("# Using", IMPL_PATH, osenvironb[IMPL_PATH])
3119 vlog("# Writing to directory", self._outputdir)
3118 vlog(
3119 "# Using",
3120 _strpath(IMPL_PATH),
3121 _strpath(osenvironb[IMPL_PATH]),
3122 )
3123 vlog("# Writing to directory", _strpath(self._outputdir))
3120 3124
3121 3125 try:
3122 3126 return self._runtests(testdescs) or 0
@@ -3357,7 +3361,7 class TestRunner(object):
3357 3361 if self.options.keep_tmpdir:
3358 3362 return
3359 3363
3360 vlog("# Cleaning up HGTMP", self._hgtmp)
3364 vlog("# Cleaning up HGTMP", _strpath(self._hgtmp))
3361 3365 shutil.rmtree(self._hgtmp, True)
3362 3366 for f in self._createdfiles:
3363 3367 try:
@@ -3468,7 +3472,7 class TestRunner(object):
3468 3472 makedirs(self._pythondir)
3469 3473 makedirs(self._bindir)
3470 3474
3471 vlog("# Running", cmd)
3475 vlog("# Running", cmd.decode("utf-8"))
3472 3476 if subprocess.call(_strpath(cmd), shell=True) == 0:
3473 3477 if not self.options.verbose:
3474 3478 try:
@@ -3643,13 +3647,11 class TestRunner(object):
3643 3647 if os.name == 'nt' and not p.endswith(b'.exe'):
3644 3648 p += b'.exe'
3645 3649 found = self._findprogram(p)
3650 p = p.decode("utf-8")
3646 3651 if found:
3647 vlog("# Found prerequisite", p, "at", found)
3652 vlog("# Found prerequisite", p, "at", _strpath(found))
3648 3653 else:
3649 print(
3650 "WARNING: Did not find prerequisite tool: %s "
3651 % p.decode("utf-8")
3652 )
3654 print("WARNING: Did not find prerequisite tool: %s " % p)
3653 3655
3654 3656
3655 3657 def aggregateexceptions(path):
General Comments 0
You need to be logged in to leave comments. Login now