Skip to content

[StdlibUnittest] Allow Interpreter to Expect Crashes #2101

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

Conversation

harlanhaskins
Copy link
Contributor

What's in this pull request?

Teach StdlibUnittest to run a sub-interpreter when run using the interpreter.
This allows interpreter-led tests to expect crashes and safely handle them.

Resolved bug number: (rdar://18080980)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

@@ -0,0 +1,15 @@
// RUN: %target-run-simple-swift -interpret
Copy link
Contributor

Choose a reason for hiding this comment

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

This substitution is not designed to accept parameters to the compiler. I'm not sure it even works the way you expect on OS X, but it definitely won't work on iOS.

I think the existing StdlibUnittest tests are sufficient, as long as they are run with the interpreter.

@gribozavr
Copy link
Contributor

LGTM modulo the comment.

@gribozavr
Copy link
Contributor

@swift-ci Please test

@harlanhaskins
Copy link
Contributor Author

Actually I hadn't run the test suite normally when I pushed this so it crashes on every test. Can we cancel the build?

@harlanhaskins
Copy link
Contributor Author

I haven't pushed the fix; I'm running tests before I push it

@harlanhaskins harlanhaskins force-pushed the stdlibunittest-interpreter-skip-crashes branch from c3b8895 to 7869605 Compare April 8, 2016 20:05
@harlanhaskins harlanhaskins force-pushed the stdlibunittest-interpreter-skip-crashes branch from 7869605 to 5d88887 Compare April 8, 2016 20:13
@harlanhaskins
Copy link
Contributor Author

@swift-ci please test

@harlanhaskins
Copy link
Contributor Author

@gribozavr I'm not sure what to make of the test failure...

@gparker42
Copy link
Contributor

The many-inputs failure is an unrelated problem elsewhere. You can ignore it.

@gribozavr
Copy link
Contributor

@gribozavr gribozavr merged commit d307e31 into swiftlang:master Apr 8, 2016
@harlanhaskins harlanhaskins deleted the stdlibunittest-interpreter-skip-crashes branch April 8, 2016 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants