tests/run-tests.py
branchstable
changeset 866 d51c3fd4e34a
parent 862 c333552ec003
child 877 c2ca6e172fd8
equal deleted inserted replaced
865:b8755285ff18 866:d51c3fd4e34a
   592     if os.name == 'nt' or sys.platform.startswith('java'):
   592     if os.name == 'nt' or sys.platform.startswith('java'):
   593         tochild, fromchild = os.popen4(cmd)
   593         tochild, fromchild = os.popen4(cmd)
   594         tochild.close()
   594         tochild.close()
   595         output = fromchild.read()
   595         output = fromchild.read()
   596         ret = fromchild.close()
   596         ret = fromchild.close()
   597         if ret == None:
   597         if ret is None:
   598             ret = 0
   598             ret = 0
   599     else:
   599     else:
   600         proc = Popen4(cmd)
   600         proc = Popen4(cmd)
   601         def cleanup():
   601         def cleanup():
   602             os.kill(proc.pid, signal.SIGTERM)
   602             os.kill(proc.pid, signal.SIGTERM)
   712     skipped = (ret == SKIPPED_STATUS)
   712     skipped = (ret == SKIPPED_STATUS)
   713 
   713 
   714     # If we're not in --debug mode and reference output file exists,
   714     # If we're not in --debug mode and reference output file exists,
   715     # check test output against it.
   715     # check test output against it.
   716     if options.debug:
   716     if options.debug:
   717         refout = None                   # to match out == None
   717         refout = None                   # to match "out is None"
   718     elif os.path.exists(ref):
   718     elif os.path.exists(ref):
   719         f = open(ref, "r")
   719         f = open(ref, "r")
   720         refout = splitnewlines(f.read())
   720         refout = splitnewlines(f.read())
   721         f.close()
   721         f.close()
   722     else:
   722     else: