Mercurial > hg
changeset 21380:de6ea36ca9f7
run-tests: move SKIPPED_STATUS into Test class
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 20 Apr 2014 10:16:36 -0700 |
parents | ab1a95270a50 |
children | 9aa5784992d4 |
files | tests/run-tests.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)