-
Notifications
You must be signed in to change notification settings - Fork 5
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
Internal: script to generate a full test case #16
Conversation
a00a8ed
to
e9c0813
Compare
3da2b7f
to
c248be1
Compare
and put the binaries somewhere on your system (ex: `/opt/stone-prover/bin`) | ||
or build the workspace and add `target/debug` to your PATH. | ||
|
||
Then, if you have a `program.cairo` file on your system, you can generate the whole test case by running the following command: |
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.
It could be useful to provide a hint on where/what program.cairo
is. I tried using fibonacci.cairo
from stone-prover/dependencies/stone-prover/e2e_test/fibonacci.cairo
but I seem to get cairo compile errors from this.
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.
You could also provide a known-good sample (probably a minimal one) in this repo, this could help you isolate any breaking changes from upstream.
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.
Yes, I modified the fibonacci test case in another PR for that. I'll merge it and then I'll modify this one.
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.
This seems good to me. I wasn't quite able to follow through with it yet, and left some comments about that, but don't let that hold you up.
Problem: we wish to create different test cases for unit and integration tests. Doing this manually is not trivial. Solution: introduce a Python script that generates all test case files based on the Cairo program file. The new `generate_test_case.py` script takes a Cairo v0 program as input, compiles it, runs it and proves it. It also generates the prover config and parameters based on the number of steps of the program.
c248be1
to
6250191
Compare
Problem: we wish to create different test cases for unit and integration tests. Doing this manually is not trivial.
Solution: introduce a Python script that generates all test case files based on the Cairo program file.
The new
generate_test_case.py
script takes a Cairo v0 program as input, compiles it, runs it and proves it. It also generates the prover config and parameters based on the number of steps of the program.