##// END OF EJS Templates
run-tests: move success() into Test
Gregory Szorc -
r21322:512968bf default
parent child Browse files
Show More
@@ -675,6 +675,9 b' class Test(object):'
675
675
676 return env
676 return env
677
677
678 def success(self):
679 return '.', self._test, ''
680
678 class TestResult(object):
681 class TestResult(object):
679 """Holds the result of a test execution."""
682 """Holds the result of a test execution."""
680
683
@@ -1049,9 +1052,6 b' def runone(options, test, count):'
1049 return '.', test, ''
1052 return '.', test, ''
1050 return warned and '~' or '!', test, msg
1053 return warned and '~' or '!', test, msg
1051
1054
1052 def success():
1053 return '.', test, ''
1054
1055 def ignore(msg):
1055 def ignore(msg):
1056 return 'i', test, msg
1056 return 'i', test, msg
1057
1057
@@ -1099,7 +1099,6 b' def runone(options, test, count):'
1099 t = runner(test, testpath, options, count, ref, err)
1099 t = runner(test, testpath, options, count, ref, err)
1100 res = TestResult()
1100 res = TestResult()
1101 t.run(res)
1101 t.run(res)
1102 t.cleanup()
1103
1102
1104 if res.exception:
1103 if res.exception:
1105 return fail('Exception during execution: %s' % res.exception, 255)
1104 return fail('Exception during execution: %s' % res.exception, 255)
@@ -1154,7 +1153,7 b' def runone(options, test, count):'
1154 elif ret:
1153 elif ret:
1155 result = fail(describe(ret), ret)
1154 result = fail(describe(ret), ret)
1156 else:
1155 else:
1157 result = success()
1156 result = t.success()
1158
1157
1159 if not options.verbose:
1158 if not options.verbose:
1160 iolock.acquire()
1159 iolock.acquire()
@@ -1162,6 +1161,8 b' def runone(options, test, count):'
1162 sys.stdout.flush()
1161 sys.stdout.flush()
1163 iolock.release()
1162 iolock.release()
1164
1163
1164 t.cleanup()
1165
1165 return result
1166 return result
1166
1167
1167 _hgpath = None
1168 _hgpath = None
General Comments 0
You need to be logged in to leave comments. Login now