Skip to content

Commit

Permalink
added convenient Makefile for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippRados committed Dec 20, 2024
1 parent acba2fe commit 2da3aee
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.PHONY: unit-tests snapshot-tests fuzzer

help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

unit-tests: ## Run rust unit-tests
cargo t --workspace

snapshot-tests: ## Run snaphot-tests located in tests/
bash tests/snapshot_tests.sh

fuzzer: ## Launch cargo-afl fuzzer
cd fuzzer && \
cargo afl build && \
cargo afl fuzz -i inputs -o outputs target/debug/fuzz_target

0 comments on commit 2da3aee

Please sign in to comment.