comparison tests/run-tests.py @ 17800:f3c36faa7374

run-tests: handle windows crlf in .py tests again Before af7c6bc48d8d all crlf occurrences in test output on Windows were simply changed to lf. In af7c6bc48d8d it was replaced by more clever handling in the .t test runner ... but the .py runner was forgotten and many .py tests were failing on Windows. The crlf/lf replacement is now reintroduced in the py test runner.
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 18 Oct 2012 00:33:29 +0200
parents 80fe64581f3a
children 03554dfc7ced
comparison
equal deleted inserted replaced
17799:327fbe0b84fd 17800:f3c36faa7374
474 474
475 def pytest(test, wd, options, replacements): 475 def pytest(test, wd, options, replacements):
476 py3kswitch = options.py3k_warnings and ' -3' or '' 476 py3kswitch = options.py3k_warnings and ' -3' or ''
477 cmd = '%s%s "%s"' % (PYTHON, py3kswitch, test) 477 cmd = '%s%s "%s"' % (PYTHON, py3kswitch, test)
478 vlog("# Running", cmd) 478 vlog("# Running", cmd)
479 if os.name == 'nt':
480 replacements.append((r'\r\n', '\n'))
479 return run(cmd, wd, options, replacements) 481 return run(cmd, wd, options, replacements)
480 482
481 def shtest(test, wd, options, replacements): 483 def shtest(test, wd, options, replacements):
482 cmd = '%s "%s"' % (options.shell, test) 484 cmd = '%s "%s"' % (options.shell, test)
483 vlog("# Running", cmd) 485 vlog("# Running", cmd)