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

Regression tests for the REPL #5469

Closed
bstrie opened this issue Mar 21, 2013 · 7 comments
Closed

Regression tests for the REPL #5469

bstrie opened this issue Mar 21, 2013 · 7 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc

Comments

@bstrie
Copy link
Contributor

bstrie commented Mar 21, 2013

rusti is great for people who are learning the language, but it's quite fragile and the devs themselves don't have much cause to use it. Regression tests are needed to keep it intact. I have no idea how to go about doing this.

@jdm
Copy link
Contributor

jdm commented Mar 21, 2013

Running cat input | rusti causes rusti to execute the code in input line by line. The tests could be pairs of input and expected output files and passing could be defined as diff output expected returning no output.

@bstrie
Copy link
Contributor Author

bstrie commented Mar 21, 2013

True, though we can't assume that rusti is installed so it would have to be something like cat input | $RUST_DIR/stage2/bin/rusti

@jbclements
Copy link
Contributor

On Mar 21, 2013, at 9:23 AM, Ben Striegel wrote:

True, though we can't assume that rusti is installed so it would have to be something like cat input | $RUST_DIR/stage2/bin/rusti

Maybe I missed something. Isn't it possible to construct test cases for rusti that don't go through stdin/stdout? It seems to me that the io can be tested elsewhere.

John Clements

@bstrie
Copy link
Contributor Author

bstrie commented Apr 2, 2013

I don't think a new tag for rusti is needed right now. A-tools is already quite sparse, and afaik the planned feature set for the REPL is small.

@lkuper
Copy link
Contributor

lkuper commented May 1, 2013

I just came across this discussion while in the process of tagging issues with A-rusti. There are 9 issues tagged with it at the moment, which seems like enough to justify having its own tag, although admittedly this is an after-the-fact sort of justification.

But, in any case, I think rusti deserves to get a lot more love, and part of that is having a tag; it'll help people remember that rusti is a thing, or, at least, it won't hurt.

+1 for regression tests for rusti, as well.

@ghost ghost assigned lkuper May 1, 2013
@lkuper
Copy link
Contributor

lkuper commented May 1, 2013

@astrieanna and I can claim this bug.

bors added a commit that referenced this issue May 14, 2013
These few commits address a few existing issues:

* #5469 - adding regression tests for `rusti`. This adds unit tests to the `rusti.rc` file (which needed some reorganization of the Makefile, see the first commit message). These are super-simple right now, and sadly can't test the output of the tests. I worked for a bit on making a compiletest version of the rusti tests, but I ended up hitting something which blocked me, although I've forgotten it by this point.
* #5937 - regression test added, and it's fixed
* #5803 - just doesn't appear to happen any more
* #5784 - it's no longer broken, and it no longer spits out warnings about unused variables.

I also did some investigation into #5774, and you may want to read the comment I left on the bug. The gist of the situation is that C++ exceptions across JIT code don't look like they're working, even though they [should be working](https://github.com/mozilla/rust/blob/3aa1122ec25d15a2a73a295f8298ad9c38b09a10/src/rustllvm/RustWrapper.cpp#L387). If anyone has any insight on this, that would be awesome!
bors added a commit that referenced this issue Jun 13, 2013
More descriptive comments can be found throughout the code, but the bulk of this is that it addresses a vast number of issues with the old rusti model.

Closes #6772, #5675, #5469, and #6617
@alexcrichton
Copy link
Member

Closed by #7070

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc
Projects
None yet
Development

No branches or pull requests

6 participants