Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ksew1 committed Oct 18, 2024
1 parent 8f9063c commit 77d9cf7
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Forge

#### Changed

- You can now pass arguments to `cairo-profiler` or `cairo-coverage`,
e.g. `snforge test --coverage --include tests-functions`. If flags name duplicates a flag in `snforge test`, you can
use `--` to separate them, e.g. `snforge test --coverage -- --help`
- You can't use now `--coverage` and `--build-profile` flags at the same time. If you want to use both, you need to run
`snforge test` twice with different flags.

## [0.32.0] - 2024-10-16

### Cast
Expand Down
18 changes: 18 additions & 0 deletions docs/src/snforge-advanced-features/profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,21 @@ If you want `snforge` to call `cairo-profiler` on generated files automatically,
```shell
$ snforge test --build-profile
```

## Passing arguments to `cairo-profiler`

You can pass additional arguments to `cairo-profiler`:

```shell
$ snforge test --build-profile --show-inlined-functions
```

If the flag name duplicates a flag from `snforge`, you can use the `--` separator:

```shell
$ snforge test --build-profile -- --help
```

> 📝 **Note**
>
> Running `snforge test --help` won't show info about `cairo-profiler` flags. To see them, run `snforge test --build-profile -- --help`.
18 changes: 18 additions & 0 deletions docs/src/testing/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ $ snforge test --coverage

This will generate a coverage report in the `coverage` directory named `coverage.lcov`.

## Passing arguments to `cairo-coverage`

You can pass additional arguments to `cairo-coverage`:

```shell
$ snforge test --coverage --include macros
```

If the flag name duplicates a flag from `snforge`, you can use the `--` separator:

```shell
$ snforge test --coverage -- --help
```

> 📝 **Note**
>
> Running `snforge test --help` won't show info about `cairo-coverage` flags. To see them, run `snforge test --coverage -- --help`.
## Coverage report

`cairo-coverage` generates coverage data as an `.lcov` file. A summary report with aggregated data can be produced by one of many tools that accept the `lcov` format.
Expand Down

0 comments on commit 77d9cf7

Please sign in to comment.