Skip to content

Commit 3cbb587

Browse files
committed
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: #2130 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 24dd016 commit 3cbb587

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tools/test.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
from Queue import Queue, Empty
5050

5151
logger = logging.getLogger('testrunner')
52+
skip_regex = re.compile(r'# SKIP\S*\s+(.*)', re.IGNORECASE)
5253

5354
VERBOSE = False
5455

@@ -256,7 +257,12 @@ def HasRun(self, output):
256257
for l in output.output.stdout.splitlines():
257258
logger.info('#' + l)
258259
else:
259-
logger.info('ok %i - %s' % (self._done, command))
260+
skip = skip_regex.search(output.output.stdout)
261+
if skip:
262+
logger.info(
263+
'ok %i - %s # skip %s' % (self._done, command, skip.group(1)))
264+
else:
265+
logger.info('ok %i - %s' % (self._done, command))
260266

261267
duration = output.test.duration
262268

@@ -1259,10 +1265,10 @@ def BuildOptions():
12591265
result.add_option("--no-suppress-dialogs", help="Display Windows dialogs for crashing tests",
12601266
dest="suppress_dialogs", action="store_false")
12611267
result.add_option("--shell", help="Path to V8 shell", default="shell")
1262-
result.add_option("--store-unexpected-output",
1268+
result.add_option("--store-unexpected-output",
12631269
help="Store the temporary JS files from tests that fails",
12641270
dest="store_unexpected_output", default=True, action="store_true")
1265-
result.add_option("--no-store-unexpected-output",
1271+
result.add_option("--no-store-unexpected-output",
12661272
help="Deletes the temporary JS files from tests that fails",
12671273
dest="store_unexpected_output", action="store_false")
12681274
return result

0 commit comments

Comments
 (0)