Show More
@@ -1041,16 +1041,6 b' def _gethgpath():' | |||
|
1041 | 1041 | pipe.close() |
|
1042 | 1042 | return _hgpath |
|
1043 | 1043 | |
|
1044 | def _checkhglib(runner, verb): | |
|
1045 | """Ensure that the 'mercurial' package imported by python is | |
|
1046 | the one we expect it to be. If not, print a warning to stderr.""" | |
|
1047 | expecthg = os.path.join(runner.pythondir, 'mercurial') | |
|
1048 | actualhg = _gethgpath() | |
|
1049 | if os.path.abspath(actualhg) != os.path.abspath(expecthg): | |
|
1050 | sys.stderr.write('warning: %s with unexpected mercurial lib: %s\n' | |
|
1051 | ' (expected %s)\n' | |
|
1052 | % (verb, actualhg, expecthg)) | |
|
1053 | ||
|
1054 | 1044 | results = {'.':[], '!':[], '~': [], 's':[], 'i':[]} |
|
1055 | 1045 | times = [] |
|
1056 | 1046 | iolock = threading.Lock() |
@@ -1100,7 +1090,7 b' def runtests(runner, tests):' | |||
|
1100 | 1090 | try: |
|
1101 | 1091 | if runner.inst: |
|
1102 | 1092 | runner.installhg() |
|
1103 |
|
|
|
1093 | runner.checkhglib("Testing") | |
|
1104 | 1094 | else: |
|
1105 | 1095 | runner.usecorrectpython() |
|
1106 | 1096 | |
@@ -1130,7 +1120,7 b' def runtests(runner, tests):' | |||
|
1130 | 1120 | print "Warned %s: %s" % s |
|
1131 | 1121 | for s in results['!']: |
|
1132 | 1122 | print "Failed %s: %s" % s |
|
1133 |
|
|
|
1123 | runner.checkhglib("Tested") | |
|
1134 | 1124 | print "# Ran %d tests, %d skipped, %d warned, %d failed." % ( |
|
1135 | 1125 | tested, skipped + ignored, warned, failed) |
|
1136 | 1126 | if results['!']: |
@@ -1301,6 +1291,16 b' class TestRunner(object):' | |||
|
1301 | 1291 | fn = os.path.join(self.inst, '..', '.coverage') |
|
1302 | 1292 | os.environ['COVERAGE_FILE'] = fn |
|
1303 | 1293 | |
|
1294 | def checkhglib(self, verb): | |
|
1295 | """Ensure that the 'mercurial' package imported by python is | |
|
1296 | the one we expect it to be. If not, print a warning to stderr.""" | |
|
1297 | expecthg = os.path.join(self.pythondir, 'mercurial') | |
|
1298 | actualhg = _gethgpath() | |
|
1299 | if os.path.abspath(actualhg) != os.path.abspath(expecthg): | |
|
1300 | sys.stderr.write('warning: %s with unexpected mercurial lib: %s\n' | |
|
1301 | ' (expected %s)\n' | |
|
1302 | % (verb, actualhg, expecthg)) | |
|
1303 | ||
|
1304 | 1304 | def main(args, parser=None): |
|
1305 | 1305 | runner = TestRunner() |
|
1306 | 1306 |
General Comments 0
You need to be logged in to leave comments.
Login now