Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: expose skip output to test runner #2130

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: if it doesn't fit on a single line, maybe write it as:

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

Expand Down