tests/run-tests.py
changeset 2246 3fd603eb6add
parent 2213 6f76a479ae51
child 2247 546c76e5a3e6
equal deleted inserted replaced
2243:caf2c6ef5b0e 2246:3fd603eb6add
   180     # If reference output file exists, check test output against it
   180     # If reference output file exists, check test output against it
   181     if os.path.exists(ref):
   181     if os.path.exists(ref):
   182         f = open(ref, "r")
   182         f = open(ref, "r")
   183         ref_out = f.read().splitlines()
   183         ref_out = f.read().splitlines()
   184         f.close()
   184         f.close()
   185         if out != ref_out:
   185     else:
   186             diffret = 1
   186         ref_out = ''
   187             print "\nERROR: %s output changed" % (test)
   187     if out != ref_out:
   188             show_diff(ref_out, out)
   188         diffret = 1
       
   189         print "\nERROR: %s output changed" % (test)
       
   190         show_diff(ref_out, out)
   189     if ret:
   191     if ret:
   190         print "\nERROR: %s failed with error code %d" % (test, ret)
   192         print "\nERROR: %s failed with error code %d" % (test, ret)
   191     elif diffret:
   193     elif diffret:
   192         ret = diffret
   194         ret = diffret
   193 
   195