##// END OF EJS Templates
run-tests: move SKIPPED_PREFIX and FAILED_PREFIX into TTest
Gregory Szorc -
r21381:9aa57849 default
parent child Browse files
Show More
@@ -92,8 +92,6 b' def Popen4(cmd, wd, timeout, env=None):'
92 92
93 93 return p
94 94
95 SKIPPED_PREFIX = 'skipped: '
96 FAILED_PREFIX = 'hghave check failed: '
97 95 PYTHON = sys.executable.replace('\\', '/')
98 96 IMPL_PATH = 'PYTHONPATH'
99 97 if 'java' in sys.platform:
@@ -627,6 +625,9 b' def stringescape(s):'
627 625 class TTest(Test):
628 626 """A "t test" is a test backed by a .t file."""
629 627
628 SKIPPED_PREFIX = 'skipped: '
629 FAILED_PREFIX = 'hghave check failed: '
630
630 631 def _run(self, testtmp, replacements, env):
631 632 f = open(self._path)
632 633 lines = f.readlines()
@@ -902,12 +903,12 b' class TTest(Test):'
902 903 missing = []
903 904 failed = []
904 905 for line in lines:
905 if line.startswith(SKIPPED_PREFIX):
906 if line.startswith(TTest.SKIPPED_PREFIX):
906 907 line = line.splitlines()[0]
907 missing.append(line[len(SKIPPED_PREFIX):])
908 elif line.startswith(FAILED_PREFIX):
908 missing.append(line[len(TTest.SKIPPED_PREFIX):])
909 elif line.startswith(TTest.FAILED_PREFIX):
909 910 line = line.splitlines()[0]
910 failed.append(line[len(FAILED_PREFIX):])
911 failed.append(line[len(TTest.FAILED_PREFIX):])
911 912
912 913 return missing, failed
913 914
General Comments 0
You need to be logged in to leave comments. Login now