-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Changes from 1 commit
ea2fa68
b673537
de4e4d0
3014572
4d6b0b5
9cd5da6
3749544
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,6 +255,9 @@ def HasRun(self, output): | |
logger.info('#' + l) | ||
for l in output.output.stdout.splitlines(): | ||
logger.info('#' + l) | ||
elif output.HasSkipped(): | ||
logger.info('ok %i - %s # skip %s' % (self._done, command, | ||
output.output.stdout.replace('1..0 # Skipped:', '').strip())) | ||
else: | ||
logger.info('ok %i - %s' % (self._done, command)) | ||
|
||
|
@@ -471,6 +474,10 @@ def UnexpectedOutput(self): | |
outcome = PASS | ||
return not outcome in self.test.outcomes | ||
|
||
def HasSkipped(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: It is not pythonic to have a method name starting with a capital letter. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Followed the conventions already established in test.py. Wasn't very keen on rewriting them all? |
||
s = '1..0 # Skipped:' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably be a regex if there's any concern about actual TAP compliance. The |
||
return self.store_unexpected_output and self.output.stdout.startswith(s) | ||
|
||
def HasPreciousOutput(self): | ||
return self.UnexpectedOutput() and self.store_unexpected_output | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as in
HasSkipped()
, should be more liker'1\.\.0 # skip\S*\s+'
(if I understand Python regex correctly)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RegEx seeems fine but where is the format documented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thefourtheye see link in PR up top.
I'll have a look at how other consumers parses skipped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to standard:
# SKIP\S*\s+
and node-tap here.