# HG changeset patch # User Gregory Szorc # Date 1398014196 25200 # Node ID de6ea36ca9f78fe6667fda473bde615f41397d5f # Parent ab1a95270a504952e08d83a89c5b128fa698730f run-tests: move SKIPPED_STATUS into Test class diff -r ab1a95270a50 -r de6ea36ca9f7 tests/run-tests.py --- a/tests/run-tests.py Sun Apr 20 10:14:25 2014 -0700 +++ b/tests/run-tests.py Sun Apr 20 10:16:36 2014 -0700 @@ -92,8 +92,6 @@ return p -# reserved exit code to skip test (used by hghave) -SKIPPED_STATUS = 80 SKIPPED_PREFIX = 'skipped: ' FAILED_PREFIX = 'hghave check failed: ' PYTHON = sys.executable.replace('\\', '/') @@ -354,6 +352,9 @@ runs cannot be run concurrently. """ + # Status code reserved for skipped tests (used by hghave). + SKIPPED_STATUS = 80 + def __init__(self, runner, test, count, refpath): path = os.path.join(runner.testdir, test) errpath = os.path.join(runner.testdir, '%s.err' % test) @@ -450,7 +451,7 @@ skipped = False - if ret == SKIPPED_STATUS: + if ret == self.SKIPPED_STATUS: if out is None: # Debug mode, nothing to parse. missing = ['unknown'] failed = None @@ -647,7 +648,7 @@ self._runner.abort) # Do not merge output if skipped. Return hghave message instead. # Similarly, with --debug, output is None. - if exitcode == SKIPPED_STATUS or output is None: + if exitcode == self.SKIPPED_STATUS or output is None: return exitcode, output return self._processoutput(exitcode, output, salt, after, expected)