Mercurial > hg
changeset 25056:e5f6c6ec21b8
run-tests: be more paranoid about os.system using bytes
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 13 Apr 2015 17:24:10 -0400 |
parents | d79258e30499 |
children | cf49cf074ec2 |
files | tests/run-tests.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Mon Apr 13 17:17:17 2015 -0400 +++ b/tests/run-tests.py Mon Apr 13 17:24:10 2015 -0400 @@ -1278,8 +1278,11 @@ if self._options.nodiff: pass elif self._options.view: - os.system("%s %s %s" % - (self._options.view, test.refpath, test.errpath)) + v = self._options.view + if sys.version_info[0] == 3: + v = v.encode('utf-8') + os.system(b"%s %s %s" % + (v, test.refpath, test.errpath)) else: servefail, lines = getdiff(expected, got, test.refpath, test.errpath)