comparison tests/run-tests.py @ 25039:8505eb1bafb1

run-tests: be more judicious about bytes vs string on test attrs This introduces a bname attribute for when we need to use the test name in a path, and retains name for when we need it as a string. Sadly, we seem to need both of these.
author Augie Fackler <augie@google.com>
date Tue, 14 Apr 2015 15:59:59 -0400
parents 66da89457c47
children 6b8c48cfb85e
comparison
equal deleted inserted replaced
25038:66da89457c47 25039:8505eb1bafb1
429 429
430 py3kwarnings enables Py3k warnings. 430 py3kwarnings enables Py3k warnings.
431 431
432 shell is the shell to execute tests in. 432 shell is the shell to execute tests in.
433 """ 433 """
434 434 self.path = path
435 self.path = path.encode('utf-8') 435 self.bname = os.path.basename(path)
436 self.name = os.path.basename(path) 436 self.name = self.bname.decode('utf-8')
437 self._testdir = os.path.dirname(path) 437 self._testdir = os.path.dirname(path)
438 self.errpath = os.path.join(self._testdir, '%s.err' % self.name) 438 self.errpath = os.path.join(self._testdir, b'%s.err' % self.bname)
439 439
440 self._threadtmp = tmpdir.encode('utf-8') 440 self._threadtmp = tmpdir
441 self._keeptmpdir = keeptmpdir 441 self._keeptmpdir = keeptmpdir
442 self._debug = debug 442 self._debug = debug
443 self._timeout = timeout 443 self._timeout = timeout
444 self._startport = startport 444 self._startport = startport
445 self._extraconfigopts = extraconfigopts or [] 445 self._extraconfigopts = extraconfigopts or []
446 self._py3kwarnings = py3kwarnings 446 self._py3kwarnings = py3kwarnings
447 self._shell = shell 447 self._shell = shell.encode('utf-8')
448 448
449 self._aborted = False 449 self._aborted = False
450 self._daemonpids = [] 450 self._daemonpids = []
451 self._finished = None 451 self._finished = None
452 self._ret = None 452 self._ret = None