##// END OF EJS Templates
run-tests: use the common test path on Windows and Java...
Patrick Mezard -
r14338:862f8cd8 default
parent child Browse files
Show More
@@ -642,45 +642,37 b' def run(cmd, wd, options, replacements):'
642 642 ret = proc.wait()
643 643 return (ret, None)
644 644
645 if os.name == 'nt' or sys.platform.startswith('java'):
646 tochild, fromchild = os.popen4(cmd)
647 tochild.close()
648 output = fromchild.read()
649 ret = fromchild.close()
650 if ret is None:
651 ret = 0
652 else:
653 proc = Popen4(cmd, wd, options.timeout)
654 def cleanup():
655 try:
656 proc.terminate()
657 except OSError:
658 pass
659 ret = proc.wait()
660 if ret == 0:
661 ret = signal.SIGTERM << 8
662 killdaemons()
663 return ret
645 proc = Popen4(cmd, wd, options.timeout)
646 def cleanup():
647 try:
648 proc.terminate()
649 except OSError:
650 pass
651 ret = proc.wait()
652 if ret == 0:
653 ret = signal.SIGTERM << 8
654 killdaemons()
655 return ret
656
657 output = ''
658 proc.tochild.close()
664 659
665 output = ''
666 proc.tochild.close()
667
668 try:
669 output = proc.fromchild.read()
670 except KeyboardInterrupt:
671 vlog('# Handling keyboard interrupt')
672 cleanup()
673 raise
660 try:
661 output = proc.fromchild.read()
662 except KeyboardInterrupt:
663 vlog('# Handling keyboard interrupt')
664 cleanup()
665 raise
674 666
675 ret = proc.wait()
676 if wifexited(ret):
677 ret = os.WEXITSTATUS(ret)
667 ret = proc.wait()
668 if wifexited(ret):
669 ret = os.WEXITSTATUS(ret)
678 670
679 if proc.timeout:
680 ret = 'timeout'
671 if proc.timeout:
672 ret = 'timeout'
681 673
682 if ret:
683 killdaemons()
674 if ret:
675 killdaemons()
684 676
685 677 for s, r in replacements:
686 678 output = re.sub(s, r, output)
General Comments 0
You need to be logged in to leave comments. Login now