##// END OF EJS Templates
run-tests: move SKIPPED_STATUS into Test class
Gregory Szorc -
r21380:de6ea36c default
parent child Browse files
Show More
@@ -92,8 +92,6 b' def Popen4(cmd, wd, timeout, env=None):'
92
92
93 return p
93 return p
94
94
95 # reserved exit code to skip test (used by hghave)
96 SKIPPED_STATUS = 80
97 SKIPPED_PREFIX = 'skipped: '
95 SKIPPED_PREFIX = 'skipped: '
98 FAILED_PREFIX = 'hghave check failed: '
96 FAILED_PREFIX = 'hghave check failed: '
99 PYTHON = sys.executable.replace('\\', '/')
97 PYTHON = sys.executable.replace('\\', '/')
@@ -354,6 +352,9 b' class Test(object):'
354 runs cannot be run concurrently.
352 runs cannot be run concurrently.
355 """
353 """
356
354
355 # Status code reserved for skipped tests (used by hghave).
356 SKIPPED_STATUS = 80
357
357 def __init__(self, runner, test, count, refpath):
358 def __init__(self, runner, test, count, refpath):
358 path = os.path.join(runner.testdir, test)
359 path = os.path.join(runner.testdir, test)
359 errpath = os.path.join(runner.testdir, '%s.err' % test)
360 errpath = os.path.join(runner.testdir, '%s.err' % test)
@@ -450,7 +451,7 b' class Test(object):'
450
451
451 skipped = False
452 skipped = False
452
453
453 if ret == SKIPPED_STATUS:
454 if ret == self.SKIPPED_STATUS:
454 if out is None: # Debug mode, nothing to parse.
455 if out is None: # Debug mode, nothing to parse.
455 missing = ['unknown']
456 missing = ['unknown']
456 failed = None
457 failed = None
@@ -647,7 +648,7 b' class TTest(Test):'
647 self._runner.abort)
648 self._runner.abort)
648 # Do not merge output if skipped. Return hghave message instead.
649 # Do not merge output if skipped. Return hghave message instead.
649 # Similarly, with --debug, output is None.
650 # Similarly, with --debug, output is None.
650 if exitcode == SKIPPED_STATUS or output is None:
651 if exitcode == self.SKIPPED_STATUS or output is None:
651 return exitcode, output
652 return exitcode, output
652
653
653 return self._processoutput(exitcode, output, salt, after, expected)
654 return self._processoutput(exitcode, output, salt, after, expected)
General Comments 0
You need to be logged in to leave comments. Login now