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