tests/run-tests.py
branchstable
changeset 910 b8ae2e290420
parent 909 5ec26580cbb2
child 912 17e4691cc491
equal deleted inserted replaced
909:5ec26580cbb2 910:b8ae2e290420
   649         return None
   649         return None
   650 
   650 
   651     def fail(msg, ret):
   651     def fail(msg, ret):
   652         if not options.nodiff:
   652         if not options.nodiff:
   653             print "\nERROR: %s %s" % (testpath, msg)
   653             print "\nERROR: %s %s" % (testpath, msg)
   654         if not ret and options.interactive:
   654         if (not ret and options.interactive
       
   655             and os.path.exists(testpath + ".err")):
   655             print "Accept this change? [n] ",
   656             print "Accept this change? [n] ",
   656             answer = sys.stdin.readline().strip()
   657             answer = sys.stdin.readline().strip()
   657             if answer.lower() in "y yes".split():
   658             if answer.lower() in "y yes".split():
   658                 if test.endswith(".t"):
   659                 if test.endswith(".t"):
   659                     rename(test + ".err", test)
   660                     rename(testpath + ".err", testpath)
   660                 else:
   661                 else:
   661                     rename(test + ".err", test + ".out")
   662                     rename(testpath + ".err", testpath + ".out")
   662                 return
   663                 return
   663         results['f'].append((test, msg))
   664         results['f'].append((test, msg))
   664 
   665 
   665     def success():
   666     def success():
   666         results['p'].append(test)
   667         results['p'].append(test)