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

example just for math*.cairo files #455

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jobez
Copy link
Collaborator

@jobez jobez commented Mar 11, 2024

a small proposal of how to have cairo program v0 integration test parity with the rust cairo vm implementation suite

Copy link
Collaborator Author

@jobez jobez left a comment

Choose a reason for hiding this comment

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

self-review

@@ -0,0 +1,62 @@
%builtins range_check
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we commit cairo files. i arbitrarily chose to just move the files in the great https://github.com/lambdaclass/cairo-vm/tree/main/cairo_programs

that matched "math.cairo

@@ -39,6 +42,19 @@ test-filter:
build-integration-test:
@zig build integration_test


# Task for running the custom integration process
run-custom-integration-test:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just for the sake of demonstration i created a separate entry point to run the integration tests that

  • specifically look up all the cairo files matching an arbitary glob
  • write all matches to a text file
  • compile all matches
  • pass the text file into the integration_test runner to actually run

var cairo_programs: []CairoTestProgram = undefined; // This will be defined after reading from the test file or defaulting to all tests.

// If there are specific tests to run, read them from the file.
if (test_files_list) |list| {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

right now this is just a dumb 'if', if there's NO command line arg, just run the programs we define in the source. if there is

Copy link

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale.
This PR will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions bot added the stale label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant