@@ -195,20 +195,25 @@ clean:
195
195
clippy : compile-cairo compile-starknet compile-cairo-1-casm compile-cairo-1-sierra compile-cairo-2-casm compile-cairo-2-sierra
196
196
cargo clippy --workspace --all-targets --all-features -- -D warnings
197
197
198
+ TEST_COMMAND: =cargo nextest run --release
199
+ ifdef TEST_COLLECT_COVERAGE
200
+ TEST_COMMAND:=cargo +nightly llvm-cov nextest --release --ignore-filename-regex 'main.rs' --no-report
201
+ endif
202
+
198
203
test : compile-cairo compile-starknet compile-cairo-1-casm compile-cairo-1-sierra compile-cairo-2-casm compile-cairo-2-sierra
199
204
echo " Cairo1 tests"
200
205
$(MAKE ) test-cairo-1
201
206
echo " Cairo2 tests"
202
207
$(MAKE ) test-cairo-2
203
208
204
209
test-cairo-1 : compile-cairo compile-starknet compile-cairo-1-casm compile-cairo-1-sierra compile-cairo-2-casm compile-cairo-2-sierra
205
- cargo nextest run --workspace --all-targets --features=cairo_1_tests,metrics,cairo-native
210
+ $( TEST_COMMAND ) --workspace --all-targets --features=cairo_1_tests,metrics,cairo-native
206
211
207
212
test-cairo-2 : compile-cairo compile-starknet compile-cairo-1-casm compile-cairo-1-sierra compile-cairo-2-casm compile-cairo-2-sierra
208
- cargo nextest run --workspace --all-targets --features=metrics,cairo-native
213
+ $( TEST_COMMAND ) --workspace --all-targets --features=metrics,cairo-native
209
214
210
215
test-cairo-native : compile-cairo compile-starknet compile-cairo-1-casm compile-cairo-1-sierra compile-cairo-2-casm compile-cairo-2-sierra
211
- cargo nextest run --workspace --test cairo_native --features=cairo-native
216
+ $( TEST_COMMAND ) --workspace --test cairo_native --features=cairo-native
212
217
213
218
test-doctests :
214
219
cargo test --workspace --doc
@@ -217,7 +222,7 @@ coverage: compile-cairo compile-starknet compile-cairo-1-casm compile-cairo-2-ca
217
222
$(MAKE ) coverage-report
218
223
219
224
coverage-report : compile-cairo compile-starknet compile-cairo-1-casm compile-cairo-1-sierra compile-cairo-2-casm compile-cairo-2-sierra
220
- cargo +nightly llvm-cov nextest --lcov --ignore-filename-regex ' main.rs ' -- output-path lcov.info --release
225
+ cargo +nightly llvm-cov report --lcov --output-path lcov.info
221
226
222
227
heaptrack :
223
228
./scripts/heaptrack.sh
0 commit comments