From 3cbb5870e5c8ce6a9da718c7fff6f50709545ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Wed, 8 Jul 2015 10:37:43 +1000 Subject: [PATCH] tools: expose skip output to test runner In the TAP protocol, skips are flagged as ok. Expose more information so we can understand if the test was skipped or not. PR-URL: https://github.com/nodejs/io.js/pull/2130 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Ben Noordhuis --- tools/test.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/test.py b/tools/test.py index 4d6337037aa7f2..fc18aacb5642f8 100755 --- a/tools/test.py +++ b/tools/test.py @@ -49,6 +49,7 @@ from Queue import Queue, Empty logger = logging.getLogger('testrunner') +skip_regex = re.compile(r'# SKIP\S*\s+(.*)', re.IGNORECASE) VERBOSE = False @@ -256,7 +257,12 @@ def HasRun(self, output): for l in output.output.stdout.splitlines(): logger.info('#' + l) else: - logger.info('ok %i - %s' % (self._done, command)) + skip = skip_regex.search(output.output.stdout) + if skip: + logger.info( + 'ok %i - %s # skip %s' % (self._done, command, skip.group(1))) + else: + logger.info('ok %i - %s' % (self._done, command)) duration = output.test.duration @@ -1259,10 +1265,10 @@ def BuildOptions(): result.add_option("--no-suppress-dialogs", help="Display Windows dialogs for crashing tests", dest="suppress_dialogs", action="store_false") result.add_option("--shell", help="Path to V8 shell", default="shell") - result.add_option("--store-unexpected-output", + result.add_option("--store-unexpected-output", help="Store the temporary JS files from tests that fails", dest="store_unexpected_output", default=True, action="store_true") - result.add_option("--no-store-unexpected-output", + result.add_option("--no-store-unexpected-output", help="Deletes the temporary JS files from tests that fails", dest="store_unexpected_output", action="store_false") return result