Skip to content

Commit

Permalink
add docs and publish bin
Browse files Browse the repository at this point in the history
  • Loading branch information
greged93 committed May 21, 2024
1 parent dd96d18 commit 8963a56
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
with:
files: |
target/release/cairo-native-test
target/release/scarb-native-test
target/release/cairo-native-compile
target/release/cairo-native-dump
target/release/cairo-native-run
Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,31 @@ cairo-native-test ./cairo-tests/
This will run all the tests (functions marked with the `#[test]` attribute).
# scarb-native-test cli tool
This tool mimics the `scarb test` [command](https://github.com/software-mansion/scarb/tree/main/extensions/scarb-cairo-test).
You can download it on our [releases](https://github.com/lambdaclass/cairo_native/releases) page.
```bash
$ scarb-native-test --help
Compiles all packages from a Scarb project matching `packages_filter` and
runs all functions marked with `#[test]`. Exits with 1 if the compilation
or run fails, otherwise 0.

Usage: scarb-native-test [OPTIONS]

Options:
-p, --package <SPEC> Packages to run this command on, can be a concrete package name (`foobar`) or a prefix glob (`foo*`) [env: SCARB_PACKAGES_FILTER=] [default: *]
-w, --workspace Run for all packages in the workspace
-f, --filter <FILTER> Run only tests whose name contain FILTER [default: ]
--include-ignored Run ignored and not ignored tests
--ignored Run only ignored tests
--run-mode <RUN_MODE> Run with JIT or AOT (compiled) [default: jit] [possible values: aot, jit]
-O, --opt-level <OPT_LEVEL> Optimization level, Valid: 0, 1, 2, 3. Values higher than 3 are considered as 3 [default: 0]
-h, --help Print help
-V, --version Print version
```
## Debugging Tips
### Useful environment variables
Expand Down
2 changes: 1 addition & 1 deletion src/bin/scarb-native-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use utils::{RunArgs, RunMode};
/// runs all functions marked with `#[test]`. Exits with 1 if the compilation
/// or run fails, otherwise 0.
#[derive(Parser, Clone, Debug)]
#[command(author, version)]
#[command(author, version, verbatim_doc_comment)]
struct Args {
#[command(flatten)]
packages_filter: PackagesFilter,
Expand Down

0 comments on commit 8963a56

Please sign in to comment.