##// END OF EJS Templates
run-tests: unify marks and result codes
Matt Mackall -
r19249:de45df26 default
parent child Browse files
Show More
@@ -852,11 +852,11 b' def runone(options, test):'
852 852 rename(testpath + ".err", testpath)
853 853 else:
854 854 rename(testpath + ".err", testpath + ".out")
855 return 'p', test, ''
856 return 'f', test, msg
855 return '.', test, ''
856 return '!', test, msg
857 857
858 858 def success():
859 return 'p', test, ''
859 return '.', test, ''
860 860
861 861 def ignore(msg):
862 862 return 'i', test, msg
@@ -937,8 +937,6 b' def runone(options, test):'
937 937
938 938 killdaemons()
939 939
940 mark = '.'
941
942 940 skipped = (ret == SKIPPED_STATUS)
943 941
944 942 # If we're not in --debug mode and reference output file exists,
@@ -960,7 +958,6 b' def runone(options, test):'
960 958 f.close()
961 959
962 960 if skipped:
963 mark = 's'
964 961 if out is None: # debug mode: nothing to parse
965 962 missing = ['unknown']
966 963 failed = None
@@ -974,10 +971,8 b' def runone(options, test):'
974 971 else:
975 972 result = skip(missing[-1])
976 973 elif ret == 'timeout':
977 mark = 't'
978 974 result = fail("timed out", ret)
979 975 elif out != refout:
980 mark = '!'
981 976 if not options.nodiff:
982 977 iolock.acquire()
983 978 if options.view:
@@ -990,14 +985,13 b' def runone(options, test):'
990 985 else:
991 986 result = fail("output changed", ret)
992 987 elif ret:
993 mark = '!'
994 988 result = fail(describe(ret), ret)
995 989 else:
996 990 result = success()
997 991
998 992 if not options.verbose:
999 993 iolock.acquire()
1000 sys.stdout.write(mark)
994 sys.stdout.write(result[0])
1001 995 sys.stdout.flush()
1002 996 iolock.release()
1003 997
@@ -1116,11 +1110,11 b' def runchildren(options, tests):'
1116 1110 except (pickle.UnpicklingError, EOFError):
1117 1111 sys.exit(255)
1118 1112 else:
1119 passed += len(childresults['p'])
1113 passed += len(childresults['.'])
1120 1114 skipped += len(childresults['s'])
1121 failed += len(childresults['f'])
1115 failed += len(childresults['!'])
1122 1116 skips.extend(childresults['s'])
1123 fails.extend(childresults['f'])
1117 fails.extend(childresults['!'])
1124 1118 if options.time:
1125 1119 childtimes = pickle.load(fp)
1126 1120 times.extend(childtimes)
@@ -1147,7 +1141,7 b' def runchildren(options, tests):'
1147 1141 outputcoverage(options)
1148 1142 sys.exit(failures != 0)
1149 1143
1150 results = dict(p=[], f=[], s=[], i=[])
1144 results = {'.':[], '!':[], 's':[], 'i':[]}
1151 1145 resultslock = threading.Lock()
1152 1146 times = []
1153 1147 iolock = threading.Lock()
@@ -1188,8 +1182,8 b' def runtests(options, tests):'
1188 1182
1189 1183 runqueue(options, tests)
1190 1184
1191 failed = len(results['f'])
1192 tested = len(results['p']) + failed
1185 failed = len(results['!'])
1186 tested = len(results['.']) + failed
1193 1187 skipped = len(results['s'])
1194 1188 ignored = len(results['i'])
1195 1189
@@ -1203,7 +1197,7 b' def runtests(options, tests):'
1203 1197 print
1204 1198 for s in results['s']:
1205 1199 print "Skipped %s: %s" % s
1206 for s in results['f']:
1200 for s in results['!']:
1207 1201 print "Failed %s: %s" % s
1208 1202 _checkhglib("Tested")
1209 1203 print "# Ran %d tests, %d skipped, %d failed." % (
General Comments 0
You need to be logged in to leave comments. Login now