-
Notifications
You must be signed in to change notification settings - Fork 344
Cleanup playgrounds test driver #3923
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
Cleanup playgrounds test driver #3923
Conversation
I'm seeing mystery errors only in PR testing, I'm hoping that the error assertion will make this more debuggable. |
For example: #3895 |
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.
Except for the trivial cleanup of using SBError.success rather than comparing str output, this looks correct.
@@ -100,9 +79,10 @@ def execute_code(self, inputFile): | |||
contents = contents_file.read() | |||
|
|||
result = self.frame.EvaluateExpression(contents, self.options) | |||
ouput = self.frame.EvaluateExpression("get_output()") | |||
output = self.frame.EvaluateExpression("get_output()") | |||
self.assertEquals(str(output.GetError()), 'success') |
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.
SBError has a Success() method and a .success property. Either of those seems more straightforward than relying on the str value.
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.
Note, there's also an lldbtest.assertSuccess() method that asserts the success of an SB Error and forwards the error message to the test output if it failed. That's probably even more convenient.
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.
there's also an
lldbtest.assertSuccess()
TIL!
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.
The intention was that if it fails, we would see the stringified error in the comparsion failure.
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.
oh! That's even better
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.
Due to the extreme latency of the PR testers I might fix that up in a separate PR.
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.
Done. A random build failrue saved the day!
@swift-ci test |
21cbd72
to
62b1d01
Compare
@swift-ci test |
@swift-ci test