From 2da3aeee2f44c1ab7282762d31e610a8c238887a Mon Sep 17 00:00:00 2001 From: Philipp Rados Date: Fri, 20 Dec 2024 21:57:47 +0100 Subject: [PATCH] added convenient Makefile for testing --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d899aef --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +.PHONY: unit-tests snapshot-tests fuzzer + +help: ## Display this help + @awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m\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