This repository has been archived by the owner on Jun 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Detect tests and treat them as tests, not main. #111
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rust_highfive has picked a reviewer for you, use r? to override) |
Closed
lgtm. waiting on rebase |
See rust-lang#107 and rust-lang#32 for some other discussion of this concept. This approach doesn’t deal with every situation, as it detects a program as either for execution or for testing, but it deals with the most common situation more elegantly than any other approach.
Rebased; http://temp.chrismorgan.info/rust-playpen/static/web.html updated too, same caveats as before. |
I actually like this over my own PR (#107). |
brson
added a commit
that referenced
this pull request
May 22, 2015
Detect tests and treat them as tests, not main.
chris-morgan
added a commit
to chris-morgan/rust-playpen
that referenced
this pull request
May 22, 2015
Hopefully this is the last missing piece of rust-lang#111.
chris-morgan
added a commit
to chris-morgan/rust-playpen
that referenced
this pull request
May 22, 2015
Hopefully this is the last missing piece of rust-lang#111.
chris-morgan
added a commit
to chris-morgan/rust-playpen
that referenced
this pull request
May 27, 2015
This reverts commits b43d164 and 6f3858c, returning to the state of c7a1ef4. I’ve tried it out locally and it all works; I’m not sure what precisely went wrong in the deployment process (after @brson had deployed it, test mode simply didn’t activate), but I’m now moderately confident it wasn’t a problem in these changes. Now that @acrichto is back, can we try it again now?
chris-morgan
added a commit
to chris-morgan/rust-playpen
that referenced
this pull request
May 27, 2015
This reverts commits b43d164 and 6f3858c, returning to the state of c7a1ef4 plus a little bit more pointed out by @acrichto (evaluate.json’s test parameter should default to `False`, not `True`). I’ve tried it out locally and it all works; I’m not sure what precisely went wrong in the deployment process (after @brson had deployed it, test mode simply didn’t activate), but I’m now moderately confident it wasn’t a problem in these changes. Now that @acrichto is back, can we try it again now?
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #107 and #32 for some other discussion of this concept.
This approach doesn’t deal with every situation, as it detects a program as either for execution or for testing, but it deals with the most common situation more elegantly than any other approach.
As usual, this code is running at http://temp.chrismorgan.info/rust-playpen/static/web.html, but the actual test functionality won’t work because it’s using play.rust-lang.org for execution and so it doesn’t have the necessary server changes to support it.