Show More
@@ -283,23 +283,6 b' def rename(src, dst):' | |||||
283 | shutil.copy(src, dst) |
|
283 | shutil.copy(src, dst) | |
284 | os.remove(src) |
|
284 | os.remove(src) | |
285 |
|
285 | |||
286 | def parsehghaveoutput(lines): |
|
|||
287 | '''Parse hghave log lines. |
|
|||
288 | Return tuple of lists (missing, failed): |
|
|||
289 | * the missing/unknown features |
|
|||
290 | * the features for which existence check failed''' |
|
|||
291 | missing = [] |
|
|||
292 | failed = [] |
|
|||
293 | for line in lines: |
|
|||
294 | if line.startswith(SKIPPED_PREFIX): |
|
|||
295 | line = line.splitlines()[0] |
|
|||
296 | missing.append(line[len(SKIPPED_PREFIX):]) |
|
|||
297 | elif line.startswith(FAILED_PREFIX): |
|
|||
298 | line = line.splitlines()[0] |
|
|||
299 | failed.append(line[len(FAILED_PREFIX):]) |
|
|||
300 |
|
||||
301 | return missing, failed |
|
|||
302 |
|
||||
303 | def showdiff(expected, output, ref, err): |
|
286 | def showdiff(expected, output, ref, err): | |
304 |
|
287 | |||
305 | servefail = False |
|
288 | servefail = False | |
@@ -472,7 +455,7 b' class Test(object):' | |||||
472 | missing = ['unknown'] |
|
455 | missing = ['unknown'] | |
473 | failed = None |
|
456 | failed = None | |
474 | else: |
|
457 | else: | |
475 | missing, failed = parsehghaveoutput(out) |
|
458 | missing, failed = TTest.parsehghaveoutput(out) | |
476 |
|
459 | |||
477 | if not missing: |
|
460 | if not missing: | |
478 | missing = ['irrelevant'] |
|
461 | missing = ['irrelevant'] | |
@@ -908,6 +891,25 b' class TTest(Test):' | |||||
908 | return '+glob' |
|
891 | return '+glob' | |
909 | return False |
|
892 | return False | |
910 |
|
893 | |||
|
894 | @staticmethod | |||
|
895 | def parsehghaveoutput(lines): | |||
|
896 | '''Parse hghave log lines. | |||
|
897 | ||||
|
898 | Return tuple of lists (missing, failed): | |||
|
899 | * the missing/unknown features | |||
|
900 | * the features for which existence check failed''' | |||
|
901 | missing = [] | |||
|
902 | failed = [] | |||
|
903 | for line in lines: | |||
|
904 | if line.startswith(SKIPPED_PREFIX): | |||
|
905 | line = line.splitlines()[0] | |||
|
906 | missing.append(line[len(SKIPPED_PREFIX):]) | |||
|
907 | elif line.startswith(FAILED_PREFIX): | |||
|
908 | line = line.splitlines()[0] | |||
|
909 | failed.append(line[len(FAILED_PREFIX):]) | |||
|
910 | ||||
|
911 | return missing, failed | |||
|
912 | ||||
911 | wifexited = getattr(os, "WIFEXITED", lambda x: False) |
|
913 | wifexited = getattr(os, "WIFEXITED", lambda x: False) | |
912 | def run(cmd, wd, options, replacements, env, abort): |
|
914 | def run(cmd, wd, options, replacements, env, abort): | |
913 | """Run command in a sub-process, capturing the output (stdout and stderr). |
|
915 | """Run command in a sub-process, capturing the output (stdout and stderr). |
General Comments 0
You need to be logged in to leave comments.
Login now