##// END OF EJS Templates
run-tests: minor cleanups
Matt Mackall -
r15416:3b7c4f96 default
parent child Browse files
Show More
@@ -559,10 +559,6 b' def linematch(el, l):'
559 return False
559 return False
560
560
561 def tsttest(test, wd, options, replacements):
561 def tsttest(test, wd, options, replacements):
562 t = open(test)
563 out = []
564 script = []
565
566 # We generate a shell script which outputs unique markers to line
562 # We generate a shell script which outputs unique markers to line
567 # up script results with our source. These markers include input
563 # up script results with our source. These markers include input
568 # line number and the last return code
564 # line number and the last return code
@@ -584,6 +580,11 b' def tsttest(test, wd, options, replaceme'
584 # can generate the surrounding doctest magic
580 # can generate the surrounding doctest magic
585 inpython = False
581 inpython = False
586
582
583 f = open(test)
584 t = f.readlines()
585 f.close()
586
587 script = []
587 for n, l in enumerate(t):
588 for n, l in enumerate(t):
588 if not l.endswith('\n'):
589 if not l.endswith('\n'):
589 l += '\n'
590 l += '\n'
@@ -623,12 +624,11 b' def tsttest(test, wd, options, replaceme'
623 # non-command/result - queue up for merged output
624 # non-command/result - queue up for merged output
624 after.setdefault(pos, []).append(l)
625 after.setdefault(pos, []).append(l)
625
626
626 t.close()
627
628 if inpython:
627 if inpython:
629 script.append("EOF\n")
628 script.append("EOF\n")
630 addsalt(n + 1)
629 addsalt(n + 1)
631
630
631 # Write out the script and execute it
632 fd, name = tempfile.mkstemp(suffix='hg-tst')
632 fd, name = tempfile.mkstemp(suffix='hg-tst')
633 try:
633 try:
634 for l in script:
634 for l in script:
General Comments 0
You need to be logged in to leave comments. Login now