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

Better support for scarb #599

Open
igaray opened this issue May 15, 2024 · 1 comment
Open

Better support for scarb #599

igaray opened this issue May 15, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed research Underspecified tasks requiring more research and prototyping than implementation.

Comments

@igaray
Copy link
Collaborator

igaray commented May 15, 2024

We can currently run Cairo tests through native with out cairo-native-test command in this repo.
It would be even better to one day be able to run tests driven scarb through native, so anyone managing their Cairo project with it could for example do scarb test --with-native.

A plan to integrate with scarb and see what changes it would require here would be the first step.
A plan on modifications to scarb would be the second.

@igaray igaray added enhancement New feature or request help wanted Extra attention is needed research Underspecified tasks requiring more research and prototyping than implementation. labels May 15, 2024
@greged93
Copy link
Collaborator

greged93 commented May 17, 2024

Here is the output of the research, first step would be to add a scarb-native-test binary which would be the same as running scarb test but with native execution. Here is the current implementation flow of scarb test:

  • Running scarb test will by default direct test execution to the scarb-cairo-test binary here.
  • Tests are filtered based on package filtering and test filtering.
  • Matched tests are executed using the TestCompilation structure.

From the above we can:

  • Reuse the same args as them for matching of the tests based on package filtering and test filtering (similar to what is done in cairo-native-test).
  • Execute the tests in a similar fashion as done with the cairo-native-test binary which also makes use of the TestCompilation structure to execute compiled test cases. In the case of scarb, we will just iterate every matched TestCompilation.

@greged93 greged93 mentioned this issue May 21, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed research Underspecified tasks requiring more research and prototyping than implementation.
Projects
Status: In Progress
Development

No branches or pull requests

2 participants