tests/run-tests.py
branchstable
changeset 915 5660a21567b7
parent 914 3c57e9963070
child 916 dd5c50a018b0
equal deleted inserted replaced
914:3c57e9963070 915:5660a21567b7
   665 
   665 
   666     def skip(msg):
   666     def skip(msg):
   667         if not options.verbose:
   667         if not options.verbose:
   668             result('s', (test, msg))
   668             result('s', (test, msg))
   669         else:
   669         else:
       
   670             iolock.acquire()
   670             print "\nSkipping %s: %s" % (testpath, msg)
   671             print "\nSkipping %s: %s" % (testpath, msg)
       
   672             iolock.release()
   671         return None
   673         return None
   672 
   674 
   673     def fail(msg, ret):
   675     def fail(msg, ret):
   674         if not options.nodiff:
   676         if not options.nodiff:
       
   677             iolock.acquire()
   675             print "\nERROR: %s %s" % (testpath, msg)
   678             print "\nERROR: %s %s" % (testpath, msg)
       
   679             iolock.release()
   676         if (not ret and options.interactive
   680         if (not ret and options.interactive
   677             and os.path.exists(testpath + ".err")):
   681             and os.path.exists(testpath + ".err")):
       
   682             iolock.acquire()
   678             print "Accept this change? [n] ",
   683             print "Accept this change? [n] ",
   679             answer = sys.stdin.readline().strip()
   684             answer = sys.stdin.readline().strip()
       
   685             iolock.release()
   680             if answer.lower() in "y yes".split():
   686             if answer.lower() in "y yes".split():
   681                 if test.endswith(".t"):
   687                 if test.endswith(".t"):
   682                     rename(testpath + ".err", testpath)
   688                     rename(testpath + ".err", testpath)
   683                 else:
   689                 else:
   684                     rename(testpath + ".err", testpath + ".out")
   690                     rename(testpath + ".err", testpath + ".out")